|
1 | 1 | language: php |
2 | | - |
3 | 2 | sudo: false |
4 | | - |
5 | 3 | cache: |
6 | | - directories: |
7 | | - - $HOME/.composer/cache |
8 | | - |
9 | | -php: |
10 | | - - 7.0 |
11 | | - - 7.1 |
| 4 | + directories: |
| 5 | + - $HOME/.composer/cache/files |
| 6 | + - $HOME/symfony-bridge/.phpunit |
12 | 7 |
|
13 | 8 | env: |
14 | | - global: |
15 | | - - TEST_COMMAND="composer test" |
16 | | - matrix: |
17 | | - - SYMFONY_VERSION=3.3.* |
| 9 | + global: |
| 10 | + - PHPUNIT_FLAGS="-v --testsuite main" |
| 11 | + - SYMFONY_PHPUNIT_DIR="$HOME/symfony-bridge/.phpunit" |
18 | 12 |
|
19 | 13 | matrix: |
20 | | - fast_finish: true |
21 | | - allow_failures: |
22 | | - - php: 7.1 |
23 | | - env: SYMFONY_VERSION=4.0.* |
24 | | - include: |
25 | | - - php: 7.0 |
26 | | - env: TEST_COMMAND="composer test-ci" COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_VERSION=3.3.* COVERAGE=true |
27 | | - - php: 7.0 |
28 | | - # We need `--prefer-source`, otherwise the `Doctrine\Tests\OrmTestCase` class won't be found. |
29 | | - env: TEST_COMMAND="phpunit --testsuite doctrine" COMPOSER_FLAGS="--prefer-source" SYMFONY_VERSION="3.3.* phpunit/phpunit:^5.7" |
30 | | - - php: 7.1 |
31 | | - env: SYMFONY_VERSION=4.0.* |
32 | | - |
33 | | -before_script: |
34 | | - - composer require symfony/symfony:${SYMFONY_VERSION} --no-update |
35 | | - - composer update $COMPOSER_FLAGS |
| 14 | + fast_finish: true |
| 15 | + include: |
| 16 | + # Minimum supported dependencies with the latest and oldest PHP version |
| 17 | + - php: 7.2 |
| 18 | + env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak_vendors" |
| 19 | + - php: 7.0 |
| 20 | + env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak_vendors" |
| 21 | + |
| 22 | + # Test the latest stable release |
| 23 | + - php: 7.0 |
| 24 | + - php: 7.1 |
| 25 | + - php: 7.2 |
| 26 | + env: COVERAGE=true PHPUNIT_FLAGS="-v --testsuite main --coverage-text --coverage-clover=build/coverage.xml" |
| 27 | + |
| 28 | + - php: 7.1 |
| 29 | + # We need `--prefer-source`, otherwise the `Doctrine\Tests\OrmTestCase` class won't be found. |
| 30 | + env: PHPUNIT_FLAGS="-v --testsuite doctrine" COMPOSER_FLAGS="--prefer-source" DEPENDENCIES="dunglas/symfony-lock:^3"" |
| 31 | + - php: 7.2 |
| 32 | + env: DEPENDENCIES="dunglas/symfony-lock:^3" |
| 33 | + - php: 7.2 |
| 34 | + env: DEPENDENCIES="dunglas/symfony-lock:^4" |
| 35 | + |
| 36 | + # Latest commit to master |
| 37 | + - php: 7.2 |
| 38 | + env: STABILITY="dev" |
| 39 | + |
| 40 | + allow_failures: |
| 41 | + # Dev-master is allowed to fail. |
| 42 | + - env: STABILITY="dev" |
| 43 | + |
| 44 | +before_install: |
| 45 | + - if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi |
| 46 | + - if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi; |
| 47 | + - if ! [ -v "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; fi; |
| 48 | + |
| 49 | +install: |
| 50 | + # To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355 |
| 51 | + - if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi |
| 52 | + - composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction |
| 53 | + - ./vendor/bin/simple-phpunit install |
36 | 54 |
|
37 | 55 | script: |
38 | | - - $TEST_COMMAND |
| 56 | + - composer validate --strict --no-check-lock |
| 57 | + - ./vendor/bin/simple-phpunit $PHPUNIT_FLAGS |
39 | 58 |
|
40 | 59 | after_success: |
41 | 60 | - if [[ $COVERAGE = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi |
|
0 commit comments