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

Commit 3a95109

Browse files
stefanotorresiweierophinney
authored andcommitted
update travis config
fix travis lowest deps build and show installed packages fix travis coverage upload and lowest deps env fix travis global env directive fix travis lowest deps build tidy .travis.yml up
1 parent a4ea444 commit 3a95109

File tree

2 files changed

+820
-682
lines changed

2 files changed

+820
-682
lines changed

.travis.yml

Lines changed: 46 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ cache:
1515

1616
env:
1717
global:
18-
- EVENT_MANAGER_VERSION="^3.0"
19-
- HYDRATOR_VERSION="^2.1"
20-
- SERVICE_MANAGER_VERSION="^3.0.3"
21-
- STDLIB_VERSION="^3.0"
2218
- SITE_URL: https://zendframework.github.io/zend-mvc
2319
- GH_USER_NAME: "Matthew Weier O'Phinney"
2420
- GH_USER_EMAIL: [email protected]
@@ -30,62 +26,73 @@ matrix:
3026
include:
3127
- php: 5.5
3228
env:
33-
- EXECUTE_CS_CHECK=true
29+
- DEPS=lowest
3430
- php: 5.5
3531
env:
36-
- EVENT_MANAGER_VERSION="^2.6.2"
37-
- HYDRATOR_VERSION="^1.1"
38-
- SERVICE_MANAGER_VERSION="^2.7.5"
39-
- STDLIB_VERSION="^2.7.5"
40-
- php: 5.6
41-
env:
42-
- EXECUTE_TEST_COVERALLS=true
32+
- DEPS=locked
4333
- DEPLOY_DOCS="$(if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then echo -n 'true' ; else echo -n 'false' ; fi)"
4434
- PATH="$HOME/.local/bin:$PATH"
35+
- php: 5.5
36+
env:
37+
- DEPS=latest
38+
- php: 5.6
39+
env:
40+
- DEPS=lowest
4541
- php: 5.6
4642
env:
47-
- EVENT_MANAGER_VERSION="^2.6.2"
48-
- HYDRATOR_VERSION="^1.1"
49-
- SERVICE_MANAGER_VERSION="^2.7.5"
50-
- STDLIB_VERSION="^2.7.5"
43+
- DEPS=locked
44+
- TEST_COVERAGE=true
45+
- php: 5.6
46+
env:
47+
- DEPS=latest
48+
- php: 7
49+
env:
50+
- DEPS=lowest
5151
- php: 7
52+
env:
53+
- DEPS=locked
54+
- CHECK_CS=true
5255
- php: 7
5356
env:
54-
- EVENT_MANAGER_VERSION="^2.6.2"
55-
- HYDRATOR_VERSION="^1.1"
56-
- SERVICE_MANAGER_VERSION="^2.7.5"
57-
- STDLIB_VERSION="^2.7.5"
58-
- php: hhvm
59-
- php: hhvm
57+
- DEPS=latest
58+
- php: hhvm
6059
env:
61-
- EVENT_MANAGER_VERSION="^2.6.2"
62-
- HYDRATOR_VERSION="^1.1"
63-
- SERVICE_MANAGER_VERSION="^2.7.5"
64-
- STDLIB_VERSION="^2.7.5"
60+
- DEPS=lowest
61+
- php: hhvm
62+
env:
63+
- DEPS=locked
64+
- php: hhvm
65+
env:
66+
- DEPS=latest
6567
allow_failures:
6668
- php: hhvm
6769

70+
env:
71+
global:
72+
- COMPOSER_ARGS="--no-interaction --ignore-platform-reqs"
73+
6874
notifications:
6975
irc: "irc.freenode.org#zftalk.dev"
7076
email: false
7177

7278
before_install:
73-
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
74-
- composer self-update
75-
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer require --dev --no-update satooshi/php-coveralls ; fi
76-
- composer require --no-update "zendframework/zend-eventmanager:$EVENT_MANAGER_VERSION" "zendframework/zend-servicemanager:$SERVICE_MANAGER_VERSION" "zendframework/zend-hydrator:$HYDRATOR_VERSION" "zendframework/zend-stdlib:$STDLIB_VERSION"
79+
- travis_retry composer self-update
80+
- if [[ $TRAVIS_PHP_VERSION != "hhvm" && $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini ; fi
7781

7882
install:
79-
- travis_retry composer install --no-interaction --ignore-platform-reqs
83+
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi
84+
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi
85+
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS satooshi/php-coveralls ; fi
86+
- travis_retry composer install $COMPOSER_ARGS
87+
- composer show --installed
8088

8189
script:
82-
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/phpunit --coverage-clover clover.xml ; fi
83-
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then ./vendor/bin/phpunit ; fi
84-
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/php-cs-fixer fix -v --diff --dry-run ; fi
85-
- 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
86-
87-
after_success:
88-
- if [[ $DEPLOY_DOCS == "true" ]]; then echo "Preparing to build and deploy documentation" ; ./zf-mkdoc-theme/deploy.sh ; echo "Completed deploying documentation" ; fi
90+
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi
91+
- if [[ $CHECK_CS == 'true' ]]; then composer cs-check ; fi
8992

9093
after_script:
91-
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/coveralls ; fi
94+
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer upload-coverage ; fi
95+
96+
after_success:
97+
- if [[ $DEPLOY_DOCS == "true" ]]; then travis_retry curl -sSL https://raw.githubusercontent.com/zendframework/zf-mkdoc-theme/master/theme-installer.sh | bash ; fi
98+
- if [[ $DEPLOY_DOCS == "true" ]]; then ./zf-mkdoc-theme/deploy.sh ; fi

0 commit comments

Comments
 (0)