Skip to content

Commit

Permalink
Merge pull request #82 from phil-davis/test-with-php-8.0
Browse files Browse the repository at this point in the history
Test with PHP8.0
  • Loading branch information
phil-davis committed Oct 3, 2020
2 parents a37c73e + 5fbdc16 commit b755c9c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
25 changes: 18 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,37 @@ php:

env:
global:
- RUN_PHPCSFIXER="TRUE"
- RUN_PHPUNIT="TRUE"
- RUN_PHPSTAN="FALSE"
matrix:
- PREFER_LOWEST="" REPORT_COVERAGE="TRUE" WITH_COVERAGE="--coverage-clover=coverage.xml"
- PREFER_LOWEST="--prefer-lowest" REPORT_COVERAGE="FALSE" WITH_COVERAGE=""

matrix:
include:
- name: 'PHPStan'
php: 7.4
env:
- RUN_PHPSTAN="TRUE"
- REPORT_COVERAGE="FALSE"
- name: 'PHP8'
dist: focal
php: nightly
env:
- RUN_PHPCSFIXER="FALSE"
- REPORT_COVERAGE="FALSE"
- name: 'PHPStan'
php: 7.4
env:
- RUN_PHPCSFIXER="FALSE"
- RUN_PHPUNIT="FALSE"
- RUN_PHPSTAN="TRUE"
- REPORT_COVERAGE="FALSE"
fast_finish: true

before_script:
- if [ $RUN_PHPCSFIXER == "FALSE" ]; then composer remove --dev friendsofphp/php-cs-fixer; fi
- composer update $PREFER_LOWEST

script:
- if [ $RUN_PHPSTAN == "FALSE" ]; then php vendor/bin/php-cs-fixer fix --dry-run --diff; fi
- if [ $RUN_PHPSTAN == "FALSE" ]; then php vendor/bin/phpunit --configuration tests/phpunit.xml $WITH_COVERAGE; fi
- if [ $RUN_PHPCSFIXER == "TRUE" ]; then php vendor/bin/php-cs-fixer fix --dry-run --diff; fi
- if [ $RUN_PHPUNIT == "TRUE" ]; then php vendor/bin/phpunit --configuration tests/phpunit.xml $WITH_COVERAGE; fi
- if [ $RUN_PHPSTAN == "TRUE" ]; then composer phpstan; fi

after_success:
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"homepage": "http://sabre.io/event/",
"license": "BSD-3-Clause",
"require": {
"php": "^7.1|^8.0"
"php": "^7.1 || ^8.0"
},
"authors": [
{
Expand Down

0 comments on commit b755c9c

Please sign in to comment.