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