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

Commit 174d050

Browse files
committed
Use composer scripts in .travis.yml
1 parent 5eb1e81 commit 174d050

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

.travis.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ matrix:
2626
include:
2727
- php: 5.5
2828
env:
29-
- EXECUTE_CS_CHECK=true
29+
- CS_CHECK=true
3030
- php: 5.6
3131
env:
32-
- EXECUTE_TEST_COVERALLS=true
32+
- TEST_COVERAGE=true
3333
- DEPLOY_DOCS="$(if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then echo -n 'true' ; else echo -n 'false' ; fi)"
3434
- PATH="$HOME/.local/bin:$PATH"
3535
- php: 7
@@ -42,21 +42,20 @@ notifications:
4242
email: false
4343

4444
before_install:
45-
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
45+
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
4646
- composer self-update
47-
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer require --dev --no-update satooshi/php-coveralls:^1.0 ; fi
47+
- if [[ $TEST_COVERAGE == 'true' ]]; then composer require --dev --no-update satooshi/php-coveralls:^1.0 ; fi
4848

4949
install:
5050
- travis_retry composer install --no-interaction
5151

5252
script:
53-
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/phpunit --coverage-clover clover.xml ; fi
54-
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then ./vendor/bin/phpunit ; fi
55-
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/phpcs ; fi
53+
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi
54+
- if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi
5655
- 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
5756

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

6160
after_script:
62-
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/coveralls -v ; fi
61+
- if [[ $TEST_COVERAGE == 'true' ]]; then composer upload-coverage ; fi

0 commit comments

Comments
 (0)