|
1 | 1 | language: php |
2 | 2 | sudo: false |
3 | 3 | cache: |
4 | | - directories: |
5 | | - - $HOME/.composer/cache/files |
6 | | - - $HOME/symfony-bridge/.phpunit |
| 4 | + directories: |
| 5 | + - $HOME/.composer/cache/files |
| 6 | + - $HOME/symfony-bridge/.phpunit |
7 | 7 | env: |
8 | | - global: |
9 | | - - PHPUNIT_FLAGS="-v" |
10 | | - - SYMFONY_PHPUNIT_DIR="$HOME/symfony-bridge/.phpunit" |
| 8 | + global: |
| 9 | + - PHPUNIT_FLAGS="-v" |
| 10 | + - SYMFONY_PHPUNIT_DIR="$HOME/symfony-bridge/.phpunit" |
11 | 11 | matrix: |
12 | | - fast_finish: true |
13 | | - include: |
14 | | - # Minimum supported dependencies with the latest and oldest PHP version |
15 | | - - php: 7.4 |
16 | | - env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak_vendors" |
17 | | - - php: 7.3 |
18 | | - env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak_vendors" |
19 | | - # Test the latest stable release |
20 | | - - php: 7.3 |
21 | | - - php: 7.4 |
22 | | - env: COVERAGE=true PHPUNIT_FLAGS="-v --coverage-text" |
23 | | - # Test LTS versions. This makes sure we do not use Symfony packages with version greater |
24 | | - # than 2 or 3 respectively. Read more at https://github.com/symfony/lts |
25 | | - - php: 7.4 |
26 | | - env: DEPENDENCIES="symfony/lts:^2" |
27 | | - - php: 7.4 |
28 | | - env: DEPENDENCIES="symfony/lts:^3" |
29 | | - # Latest commit to master |
30 | | - - php: 7.4 |
31 | | - |
| 12 | + fast_finish: true |
| 13 | + include: |
| 14 | + # Minimum supported dependencies with the latest and oldest PHP version |
| 15 | + - php: 7.4 |
| 16 | + env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak_vendors" |
| 17 | + - php: 7.2 |
| 18 | + env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak_vendors" |
| 19 | + # Test the latest stable release |
| 20 | + - php: 7.2 |
| 21 | + - php: 7.3 |
| 22 | + - php: 7.4 |
| 23 | + env: COVERAGE=true PHPUNIT_FLAGS="-v --coverage-text" |
| 24 | + # Test LTS versions. This makes sure we do not use Symfony packages with version greater |
| 25 | + # than 2 or 3 respectively. Read more at https://github.com/symfony/lts |
| 26 | + # Latest commit to master |
| 27 | + - php: 7.4 |
| 28 | + env: STABILITY="dev" |
| 29 | + allow_failures: |
| 30 | + # Dev-master is allowed to fail. |
| 31 | + - env: STABILITY="dev" |
| 32 | +before_install: |
| 33 | + - if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi |
| 34 | + - if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi; |
| 35 | + - if ! [ -v "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; fi; |
32 | 36 | install: |
33 | | - - composer update ${COMPOSER_FLAGS} --no-progress --no-suggest --ansi |
34 | | - |
| 37 | + # To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355 |
| 38 | + - if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi |
| 39 | + - composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction |
| 40 | + - ./vendor/bin/simple-phpunit install |
35 | 41 | script: |
36 | | - - vendor/bin/simple-phpunit |
| 42 | + - composer validate --strict --no-check-lock |
| 43 | + # simple-phpunit is the PHPUnit wrapper provided by the PHPUnit Bridge component and |
| 44 | + # it helps with testing legacy code and deprecations (composer require symfony/phpunit-bridge) |
| 45 | + - ./vendor/bin/simple-phpunit $PHPUNIT_FLAGS |
0 commit comments