Merge pull request #22156 from rodrigoprimo/split-travis-build-job

Use separate Travis build jobs to run e2e tests and PHPCS
This commit is contained in:
Rodrigo Primo 2018-12-19 11:30:49 -02:00 committed by GitHub
commit eccaa3d286
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 3 deletions

View File

@ -13,6 +13,7 @@ php:
- 5.6
- 7.0
- 7.1
- 7.2
env:
- WP_VERSION=latest WP_MULTISITE=0
@ -26,9 +27,14 @@ matrix:
dist: precise
- php: 5.2
dist: precise
- php: 7.2
env: WP_VERSION=latest WP_MULTISITE=0 RUN_PHPCS=1 RUN_E2E=1
- php: 7.1
- name: "Coding standard check"
php: 7.2
env: WP_VERSION=latest WP_MULTISITE=0 RUN_PHPCS=1
- name: "e2e tests"
php: 7.2
env: WP_VERSION=latest WP_MULTISITE=0 RUN_E2E=1
- name: "Unit tests code coverage"
php: 7.1
env: WP_VERSION=latest WP_MULTISITE=0 RUN_CODE_COVERAGE=1
- php: 7.3
env: WP_VERSION=5.0-beta5 WP_MULTISITE=0

View File

@ -1,4 +1,9 @@
#!/usr/bin/env bash
if [[ ${RUN_PHPCS} == 1 ]] || [[ ${RUN_E2E} == 1 ]]; then
exit
fi
if [[ ${RUN_CODE_COVERAGE} == 1 ]]; then
phpdbg -qrr -d memory_limit=-1 $HOME/.composer/vendor/bin/phpunit -c phpunit.xml --coverage-clover=coverage.clover --exclude-group=timeout
else