Skip to content

Commit 731386e

Browse files
authored
Merge pull request #99 from thephpleague/simplify-travis
Use cache, prefer-lowest/stable instead of specific versions
2 parents 81bbcad + d423db7 commit 731386e

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

.travis.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,24 @@ 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.*"
21+
global:
22+
- setup=basic
23+
24+
matrix:
25+
include:
26+
- php: 5.3
27+
env: setup=lowest
28+
- php: 5.5
29+
env: setup=lowest
2030

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
31+
install:
32+
- if [[ $setup = 'basic' ]]; then travis_retry composer install --prefer-dist --no-interaction; fi
33+
- if [[ $setup = 'lowest' ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-lowest --prefer-stable; fi
2534

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

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
"symfony/http-foundation": "~2.1|~3.0"
3333
},
3434
"require-dev": {
35-
"omnipay/tests": "~2.0"
35+
"omnipay/tests": "~2.0",
36+
"squizlabs/php_codesniffer": "~1.5"
3637
},
3738
"extra": {
3839
"branch-alias": {

0 commit comments

Comments
 (0)