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

Optimize travis #44

Merged
merged 2 commits into from
Apr 16, 2019
Merged
Changes from 1 commit
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
Next Next commit
Optimize travis
- Only install composer dev-dependiencies for linting
- Run both single and multisite on a single build
- Test minimum WP version too
  • Loading branch information
grappler committed Apr 15, 2019
commit 51fa1cddbebf1c5fd04115a490b7c8b46863da29
26 changes: 20 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ php:
- 7.3
- 7.2
- 5.6
- 5.4

env:
- WP_VERSION=latest WP_MULTISITE=0
- WP_VERSION=latest WP_MULTISITE=1
- WP_VERSION=latest

before_install:
- |
Expand All @@ -37,21 +35,36 @@ before_install:
export PATH=`composer config --list --global | grep '\[home\]' | { read a; echo "${a#* }/vendor/bin:$PATH"; }`

install:
- composer install
- composer install --no-dev --ignore-platform-reqs

before_script:
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
- |
if [[ ! -z "$WP_VERSION" ]] ; then
bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
composer global require "phpunit/phpunit=4.8.*|6.5.*"
fi

script: vendor/bin/phpunit
script:
- |
if [[ ! -z "$WP_VERSION" ]] ; then
phpunit
WP_MULTISITE=1 phpunit
fi

jobs:
fast_finish: true
include:
- stage: test-min
php: 5.4
env:
- WP_VERSION=4.0.26
- stage: lint
install: composer install
script:
- composer lint
- stage: coverage
install: composer install
before_install: skip
script:
- composer test -- --coverage-clover=coverage.xml
Expand All @@ -61,5 +74,6 @@ jobs:
stages:
- lint
- test
- test-min
- coverage
- deploy