Skip to content

Commit 7cea880

Browse files
committed
improve travis-ci matrix
1 parent dfe7f56 commit 7cea880

File tree

1 file changed

+19
-21
lines changed

1 file changed

+19
-21
lines changed

.travis.yml

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
language: php
2-
32
sudo: false
4-
53
cache:
64
directories:
75
- $HOME/.composer/cache/files
86
- $HOME/symfony-bridge/.phpunit
97

108
env:
119
global:
12-
- TEST_COMMAND="composer test"
13-
- SYMFONY_PHPUNIT_VERSION="6.3"
10+
- PHPUNIT_FLAGS="-v"
1411
- SYMFONY_PHPUNIT_DIR="$HOME/symfony-bridge/.phpunit"
1512

1613
branches:
@@ -21,48 +18,49 @@ matrix:
2118
fast_finish: true
2219
include:
2320
# Minimum supported Symfony version and latest PHP version
24-
- php: 7.1
25-
env: DEPENDENCIES="minimum" COVERAGE=true TEST_COMMAND="composer test-ci" SYMFONY_DEPRECATIONS_HELPER="weak" SYMFONY_PHPUNIT_VERSION="5.7"
21+
- php: 7.2
22+
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak"
2623

2724
# Test the latest stable release
25+
- php: 5.5
2826
- php: 5.6
29-
env: SYMFONY_PHPUNIT_VERSION="5.7"
3027
- php: 7.0
3128
- php: 7.1
3229
- php: 7.2
30+
env: COVERAGE=true PHPUNIT_FLAGS="-v --coverage-text --coverage-clover=build/coverage.xml"
3331

34-
# Test LTS versions
35-
- php: 5.5
32+
# Test LTS versions. This makes sure we do not use Symfony packages with version greater
33+
# than 2 or 3 respectively. Read more at https://github.com/symfony/lts
34+
- php: 7.2
3635
env: DEPENDENCIES="dunglas/symfony-lock:^2"
37-
- php: 5.5
36+
- php: 7.2
3837
env: DEPENDENCIES="dunglas/symfony-lock:^3"
39-
- php: 7.1
40-
env: DEPENDENCIES="dunglas/symfony-lock:^4"
38+
- php: 7.2
39+
env: DEPENDENCIES="dunglas/symfony-lock:^4" STABILITY="rc"
4140

4241
# Latest commit to master
43-
- php: 7.1
44-
env: DEPENDENCIES="dev"
42+
- php: 7.2
43+
env: STABILITY="dev"
4544

4645
allow_failures:
4746
# dev-master is allowed to fail.
48-
- php: 7.1
49-
env: DEPENDENCIES="dev"
47+
- php: 7.2
48+
env: STABILITY="dev"
5049

5150
before_install:
5251
- if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi
53-
- if [ "$DEPENDENCIES" = "minimum" ]; then COMPOSER_FLAGS="--prefer-stable --prefer-lowest"; fi;
54-
- if [ "$DEPENDENCIES" = "dev" ]; then composer config minimum-stability dev; fi;
55-
- if [[ $DEPENDENCIES == *"/"* ]]; then composer require --no-update $DEPENDENCIES; fi;
52+
- if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi;
53+
- if ! [ -v "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; fi;
5654

5755
install:
5856
# To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355
5957
- if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi
6058
- composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction
61-
- vendor/bin/simple-phpunit install
59+
- ./vendor/bin/simple-phpunit install
6260

6361
script:
6462
- composer validate --strict --no-check-lock
65-
- $TEST_COMMAND
63+
- ./vendor/bin/simple-phpunit $PHPUNIT_FLAGS
6664

6765
after_success:
6866
- if [[ $COVERAGE = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi

0 commit comments

Comments
 (0)