diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml new file mode 100644 index 0000000..7efa9ee --- /dev/null +++ b/.github/workflows/coveralls.yml @@ -0,0 +1,49 @@ +name: coveralls + +on: + push: + pull_request: + +jobs: + tests: + runs-on: ${{ matrix.os }} + continue-on-error: ${{ matrix.experimental }} + strategy: + matrix: + os: + - "ubuntu-latest" + php: + - "7.2" + dependencies: + - "locked" + experimental: + - false + + name: PHP${{ matrix.php }} on ${{ matrix.os }} (${{ matrix.dependencies }}) + + steps: + - name: Checkout code + uses: actions/checkout@v1 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, sqlite3, pdo_sqlite, bcmath, fileinfo + coverage: xdebug + + - name: Install dependencies + uses: "ramsey/composer-install@v1" + with: + dependency-versions: "${{ matrix.dependencies }}" + composer-options: "--prefer-dist" + + - name: Execute tests + run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml + + - name: Upload coverage results to Coveralls + env: + COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + composer global require php-coveralls/php-coveralls + php-coveralls --coverage_clover=build/logs/clover.xml -v diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d03bbd1..0000000 --- a/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -dist: bionic -language: php - -php: - - 7.2 - -before_install: - - travis_retry composer self-update - - composer config discard-changes true - -before_script: - - composer install --prefer-dist --no-interaction - - wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.2.0/php-coveralls.phar - - chmod +x php-coveralls.phar - -script: - - ./vendor/bin/phpunit -c phpunit.xml --coverage-clover build/logs/clover.xml - -after_script: - - php-coveralls.phar -v - -matrix: - fast_finish: true