-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite Travis CI tests to Github Actions
- Loading branch information
Showing
2 changed files
with
51 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file was deleted.
Oops, something went wrong.