Skip to content

Commit

Permalink
Rewrite Travis CI tests to Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
e1himself committed Jul 21, 2021
1 parent a647a0f commit 1411e82
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 28 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
on: push
name: Test
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '7.0', '7.1', '7.2', '7.3', '7.4' ]

continue-on-error: ${{ matrix.php == '7.4' }}

steps:
- uses: actions/checkout@master

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug2

- name: Install Dependencies
env:
COMPOSER_FLAGS: ${{ (matrix.php == '7.4') && ' --ignore-platform-reqs' || '' }}
run: |
composer install $COMPOSER_FLAGS
- name: Test
run: |
php -d error_reporting=$(php -r 'echo E_ALL & ~ E_DEPRECATED & ~ E_NOTICE;') \
-d xdebug.mode=coverage \
-d xdebug.overload_var_dump=0 \
vendor/bin/phpunit
- name: Upload coverage results to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: PHP ${{ matrix.php }}
run: |
composer global require php-coveralls/php-coveralls
php-coveralls --coverage_clover=build/logs/clover.xml -v
coveralls-webhook:
# @see https://github.com/php-coveralls/php-coveralls#parallel-builds
# @see https://docs.coveralls.io/parallel-build-webhook
name: Merge Coveralls parallel build results
runs-on: ubuntu-latest
needs: test
steps:
- run: curl https://coveralls.io/webhook?repo_token=${{ secrets.GITHUB_TOKEN }}
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

0 comments on commit 1411e82

Please sign in to comment.