|
1 | 1 | language: php |
2 | | - |
| 2 | +sudo: false |
3 | 3 | cache: |
4 | | - directories: |
5 | | - - $HOME/.composer/cache |
6 | | -branches: |
7 | | - except: |
8 | | - - /^analysis-.*$/ |
9 | | - |
10 | | -php: |
11 | | - - 5.6 |
12 | | - - 7.0 |
13 | | - - 7.1 |
| 4 | + directories: |
| 5 | + - $HOME/.composer/cache/files |
| 6 | + - $HOME/symfony-bridge/.phpunit |
14 | 7 | env: |
15 | | - global: |
16 | | - - TEST_COMMAND="composer test" |
17 | | - include: |
18 | | - - php: hhvm |
19 | | - dist: trusty |
20 | | - matrix: |
21 | | - - SYMFONY_VERSION=3.1.* |
22 | | - - SYMFONY_VERSION=3.0.* |
23 | | - - SYMFONY_VERSION=2.8.* |
24 | | - - SYMFONY_VERSION=2.7.* |
| 8 | + global: |
| 9 | + - TEST_COMMAND="composer test" |
| 10 | + - SYMFONY_PHPUNIT_VERSION="6.3" |
25 | 11 |
|
26 | 12 | matrix: |
27 | | - fast_finish: true |
28 | | - include: |
29 | | - - php: 5.6 |
30 | | - env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci" SYMFONY_VERSION=2.7.* |
| 13 | + fast_finish: true |
| 14 | + include: |
| 15 | + # Minimum supported Symfony version with the latest PHP version |
| 16 | + - php: 7.1 |
| 17 | + env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" |
| 18 | + |
| 19 | + # Test the latest stable release |
| 20 | + - php: 7.0 |
| 21 | + - php: 7.1 |
| 22 | + - php: 7.2 |
| 23 | + env: COVERAGE=true TEST_COMMAND="composer test-ci" |
| 24 | + |
| 25 | + # Force some major versions of Symfony |
| 26 | + - php: 7.2 |
| 27 | + env: DEPENDENCIES="dunglas/symfony-lock:^3" |
| 28 | + - php: 7.2 |
| 29 | + env: DEPENDENCIES="dunglas/symfony-lock:^4" |
| 30 | + |
| 31 | + # Latest commit to master |
| 32 | + - php: 7.2 |
| 33 | + env: STABILITY="dev" |
| 34 | + |
| 35 | + allow_failures: |
| 36 | + # Dev-master is allowed to fail. |
| 37 | + - env: STABILITY="dev" |
| 38 | + |
| 39 | +before_install: |
| 40 | + - if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi |
| 41 | + - if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi; |
| 42 | + - if ! [ -z "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; fi; |
31 | 43 |
|
32 | 44 | install: |
33 | | - - composer require symfony/symfony:${SYMFONY_VERSION} --no-update |
34 | | - - travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction |
| 45 | + # To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355 |
| 46 | + - if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi |
| 47 | + - composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction |
35 | 48 |
|
36 | 49 | script: |
| 50 | + - composer validate --strict --no-check-lock |
37 | 51 | - $TEST_COMMAND |
38 | 52 |
|
39 | 53 | after_success: |
|
0 commit comments