Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit 4eb52c5

Browse files
committed
Use composer scripts in .travis.yml
1 parent 412cf4e commit 4eb52c5

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

.travis.yml

+7-8
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ matrix:
3131
- DEPS=lowest
3232
- php: 5.5
3333
env:
34-
- EXECUTE_CS_CHECK=true
34+
- CS_CHECK=true
3535
- DEPS=locked
3636
- php: 5.5
3737
env:
@@ -41,7 +41,7 @@ matrix:
4141
- DEPS=lowest
4242
- php: 5.6
4343
env:
44-
- EXECUTE_TEST_COVERALLS=true
44+
- TEST_COVERAGE=true
4545
- DEPS=locked
4646
- DEPLOY_DOCS="$(if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then echo -n 'true' ; else echo -n 'false' ; fi)"
4747
- PATH="$HOME/.local/bin:$PATH"
@@ -74,9 +74,9 @@ notifications:
7474
email: false
7575

7676
before_install:
77-
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
77+
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
7878
- composer self-update
79-
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer require --dev --no-update satooshi/php-coveralls ; fi
79+
- if [[ $TEST_COVERAGE == 'true' ]]; then composer require --dev --no-update satooshi/php-coveralls ; fi
8080

8181
install:
8282
- if [[ $DEPS == 'latest' ]]; then travis_retry composer require --dev --no-update $COMPOSER_ARGS $LATEST_DEPS ; fi
@@ -86,13 +86,12 @@ install:
8686
- composer show --installed
8787

8888
script:
89-
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/phpunit --coverage-clover clover.xml ; fi
90-
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then ./vendor/bin/phpunit ; fi
91-
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/php-cs-fixer fix -v --diff --dry-run ; fi
89+
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi
90+
- if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi
9291
- if [[ $DEPLOY_DOCS == "true" && "$TRAVIS_TEST_RESULT" == "0" ]]; then wget -O theme-installer.sh "https://raw.githubusercontent.com/zendframework/zf-mkdoc-theme/master/theme-installer.sh" ; chmod 755 theme-installer.sh ; ./theme-installer.sh ; fi
9392

9493
after_success:
9594
- if [[ $DEPLOY_DOCS == "true" ]]; then echo "Preparing to build and deploy documentation" ; ./zf-mkdoc-theme/deploy.sh ; echo "Completed deploying documentation" ; fi
9695

9796
after_script:
98-
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/coveralls ; fi
97+
- if [[ $TEST_COVERAGE == 'true' ]]; then composer upload-coverage ; fi

0 commit comments

Comments
 (0)