diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..586124f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,44 @@ +name: CI +on: + push: + branches: + - master + paths-ignore: + - "**/*.md" + - "LICENSE" + pull_request: +jobs: + test: + name: OpenTracing (PHP version ${{ matrix.php-versions }} on ${{ matrix.operating-system }}) + runs-on: ${{ matrix.operating-system }} + strategy: + fail-fast: false + matrix: + operating-system: [ubuntu-latest, windows-latest, macos-latest] + php-versions: ["7.1", "7.2", "7.3", "7.4", "8.0", "8.1"] + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup PHP, with composer and extensions + uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php + with: + php-version: ${{ matrix.php-versions }} + - name: Get composer cache directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + - name: Cache composer dependencies + uses: actions/cache@v2 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ runner.os }}-composer- + - name: Install Composer dependencies + run: | + composer install --no-progress --prefer-dist --optimize-autoloader + - name: Run lint + if: matrix.operating-system != 'windows-latest' + run: composer lint + - name: Run static check + run: composer static-check + - name: Run tests + run: composer test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a3ac709..0000000 --- a/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -language: php - -php: - - '7.1' - - '7.2' - - '7.3' - - '7.4' - - '8.0' - -cache: - directories: - - $HOME/.composer/cache - -install: - - composer install - -before_script: - - phpenv config-add .travis/php.ini - - php -i # displays PHP config - -script: - - composer lint - - composer static-check - - composer test diff --git a/.travis/php.ini b/.travis/php.ini deleted file mode 100644 index 192d344..0000000 --- a/.travis/php.ini +++ /dev/null @@ -1,3 +0,0 @@ -display_errors = On -error_reporting = E_ALL -display_startup_errors = On