Skip to content

Commit 71f1b99

Browse files
authored
Use cache, prefer-lowest/stable instead of specific versions
1 parent 81bbcad commit 71f1b99

File tree

1 file changed

+24
-9
lines changed

1 file changed

+24
-9
lines changed

.travis.yml

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,30 @@ php:
1212
# See: http://docs.travis-ci.com/user/workers/container-based-infrastructure/
1313
sudo: false
1414

15+
## Cache composer
16+
cache:
17+
directories:
18+
- $HOME/.composer/cache
19+
1520
env:
16-
- SYMFONY_VERSION="2.1" GUZZLE_VERSION="3.1"
17-
- SYMFONY_VERSION="2.*" GUZZLE_VERSION="3.1"
18-
- SYMFONY_VERSION="2.1" GUZZLE_VERSION="3.*"
19-
- SYMFONY_VERSION="2.*" GUZZLE_VERSION="3.*"
20-
21-
before_script:
22-
- composer require symfony/http-foundation:${SYMFONY_VERSION} --no-update
23-
- composer require guzzle/guzzle:${GUZZLE_VERSION} --no-update
24-
- composer install -n --dev --prefer-source
21+
global:
22+
- setup=basic
23+
24+
matrix:
25+
include:
26+
- php: 5.3
27+
env: setup=lowest
28+
- php: 5.3
29+
env: setup=stable
30+
- php: 5.5
31+
env: setup=lowest
32+
- php: 5.5
33+
env: setup=stable
34+
35+
install:
36+
- if [[ $setup = 'basic' ]]; then travis_retry composer install --prefer-dist --no-interaction; fi
37+
- if [[ $setup = 'stable' ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-stable; fi
38+
- if [[ $setup = 'lowest' ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-lowest --prefer-stable; fi
39+
2540

2641
script: vendor/bin/phpcs --standard=PSR2 src && vendor/bin/phpunit --coverage-text

0 commit comments

Comments
 (0)