|
1 | 1 | language: php
|
2 | 2 | sudo: false
|
| 3 | +cache: |
| 4 | + directories: |
| 5 | + - $HOME/.composer/cache/files |
| 6 | + - $HOME/symfony-bridge/.phpunit |
3 | 7 |
|
4 |
| -php: |
5 |
| - - 5.5 |
6 |
| - - 5.6 |
7 |
| - - 7.0 |
| 8 | +env: |
| 9 | + global: |
| 10 | + - PHPUNIT_FLAGS="-v" |
| 11 | + - SYMFONY_PHPUNIT_DIR="$HOME/symfony-bridge/.phpunit" |
| 12 | + |
| 13 | +matrix: |
| 14 | + fast_finish: true |
| 15 | + include: |
| 16 | + # Minimum supported Symfony version with the latest PHP version |
| 17 | + - php: 7.2 |
| 18 | + env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak" |
| 19 | + |
| 20 | + # Test the latest stable release |
| 21 | + - php: 5.5 |
| 22 | + - php: 5.6 |
| 23 | + - php: 7.0 |
| 24 | + - php: 7.1 |
| 25 | + - php: 7.2 |
| 26 | + env: COVERAGE=true PHPUNIT_FLAGS="-v --coverage-text" |
| 27 | + |
| 28 | + # Test LTS versions. This makes sure we do not use Symfony packages with version greater |
| 29 | + # than 2 or 3 respectively. Read more at https://github.com/symfony/lts |
| 30 | + - php: 7.2 |
| 31 | + env: DEPENDENCIES="dunglas/symfony-lock:^2" |
| 32 | + - php: 7.2 |
| 33 | + env: DEPENDENCIES="dunglas/symfony-lock:^3" |
| 34 | + - php: 7.2 |
| 35 | + env: DEPENDENCIES="dunglas/symfony-lock:^4" |
| 36 | + |
| 37 | + # Latest commit to master |
| 38 | + - php: 7.2 |
| 39 | + env: STABILITY="dev" |
| 40 | + |
| 41 | + allow_failures: |
| 42 | + # Dev-master is allowed to fail. |
| 43 | + - env: STABILITY="dev" |
| 44 | + |
| 45 | +before_install: |
| 46 | + - if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi |
| 47 | + - if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi; |
| 48 | + - if ! [ -v "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; fi; |
8 | 49 |
|
9 | 50 | install:
|
10 |
| - - composer selfupdate |
11 |
| - - composer install --no-interaction |
| 51 | + # To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355 |
| 52 | + - if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi |
| 53 | + - composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction |
| 54 | + - ./vendor/bin/simple-phpunit install |
| 55 | + |
| 56 | +script: |
| 57 | + - composer validate --strict --no-check-lock |
| 58 | + - ./vendor/bin/simple-phpunit $PHPUNIT_FLAGS |
12 | 59 |
|
13 | 60 | addons:
|
14 | 61 | code_climate:
|
|
0 commit comments