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: test against high/low WPCS #210

Merged
merged 1 commit into from
Apr 25, 2019
Merged
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
16 changes: 8 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@ php:
- "7.4snapshot"

env:
# Highest supported PHPCS version.
- PHPCS_BRANCH="dev-master" LINT=1
# Lowest supported PHPCS version.
- PHPCS_BRANCH="3.3.1"
# Highest supported PHPCS + WPCS versions.
- PHPCS_BRANCH="dev-master" WPCS_BRANCH="dev-master" LINT=1
# Lowest supported PHPCS + WPCS versions.
- PHPCS_BRANCH="3.3.1" WPCS_BRANCH="2.0.0"

matrix:
fast_finish: true
include:
# Seperate builds for PHP 7.2 with additional checks.
- php: 7.2
env: PHPCS_BRANCH="dev-master" LINT=1 SNIFF=1
env: PHPCS_BRANCH="dev-master" WPCS_BRANCH="2.0.0" LINT=1 SNIFF=1
addons:
apt:
packages:
- libxml2-utils
- php: 7.2
env: PHPCS_BRANCH="3.3.1"
env: PHPCS_BRANCH="3.3.1" WPCS_BRANCH="dev-master"

allow_failures:
# Allow failures for unstable builds.
Expand All @@ -49,11 +49,11 @@ before_install:
# Speed up build time by disabling Xdebug.
- phpenv config-rm xdebug.ini || echo 'No xdebug config.'
- export XMLLINT_INDENT=" "
- composer require squizlabs/php_codesniffer:${PHPCS_BRANCH} --no-update --no-suggest --no-scripts
- composer require squizlabs/php_codesniffer:${PHPCS_BRANCH} wp-coding-standards/wpcs:${WPCS_BRANCH} --no-update --no-suggest --no-scripts
- |
if [[ "$SNIFF" == "1" ]]; then
composer install --dev --no-suggest
# The post-install-cmd script takes care of the installed_paths.
# The Composer PHPCS plugin takes care of the installed_paths.
else
if [[ ${TRAVIS_PHP_VERSION:0:3} > "7.1" ]]; then composer require phpunit/phpunit:^7.0 --no-update --no-suggest --no-scripts;fi
composer install --no-dev --no-suggest --no-scripts
Expand Down