Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis: add build against PHP 8.0 #83

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,13 @@ jobs:

#### TEST STAGE ####
# Additional builds to prevent issues with PHPCS versions incompatible with certain PHP versions.
# PHP 7.3 is only supported since PHPCS 3.3.1, PHP 7.4 since PHPCS 3.5.0.
# PHP 7.3 is only supported since PHPCS 3.3.1, PHP 7.4 since PHPCS 3.5.0, PHP 8.0 as of PHPCS 3.5.7.
- stage: test
php: 7.4
php: 8.0
env: PHPCS_VERSION="dev-master" LINT=1
- php: 8.0
env: PHPCS_VERSION="3.5.7"
- php: 7.4
env: PHPCS_VERSION="dev-master" LINT=1
- php: 7.4
env: PHPCS_VERSION="3.5.0"
Expand All @@ -94,7 +98,7 @@ jobs:
env: PHPCS_VERSION="3.3.1"

- php: "nightly"
env: PHPCS_VERSION="n/a" LINT=1
env: PHPCS_VERSION="dev-master" LINT=1

allow_failures:
# Allow failures for unstable builds.
Expand All @@ -115,19 +119,20 @@ before_install:

install:
# Set up test environment using Composer.
- |
if [[ $PHPCS_VERSION != "n/a" ]]; then
composer require --no-update --no-scripts squizlabs/php_codesniffer:${PHPCS_VERSION}
fi
- travis_retry composer require --no-update --no-scripts squizlabs/php_codesniffer:${PHPCS_VERSION}
- |
if [[ "$TRAVIS_BUILD_STAGE_NAME" == "Sniff" || $PHPCS_VERSION == "n/a" ]]; then
# The sniff stage doesn't run the unit tests, so no need for PHPUnit.
# The build on nightly also doesn't run the tests (yet).
composer remove --dev phpunit/phpunit --no-update --no-scripts
fi

# --prefer-dist will allow for optimal use of the travis caching ability.
- composer install --prefer-dist --no-suggest
- |
if [[ $TRAVIS_PHP_VERSION == "nightly" || $TRAVIS_PHP_VERSION == "8.0" ]]; then
# Allow for installing PHPUnit 7 on PHP 8.
travis_retry composer install --prefer-dist --no-suggest --ignore-platform-reqs
else
travis_retry composer install --prefer-dist --no-suggest
fi

script:
# Lint PHP files against parse errors.
Expand Down