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