|
1 | 1 | language: php
|
2 |
| - |
3 | 2 | sudo: false
|
4 | 3 |
|
5 |
| -dist: trusty |
6 |
| - |
7 | 4 | cache:
|
8 |
| - directories: |
9 |
| - - $HOME/.composer/cache/files |
| 5 | + directories: |
| 6 | + - $HOME/.composer/cache/files |
10 | 7 |
|
11 |
| -env: |
12 |
| - global: |
13 |
| - - TEST_COMMAND="composer test" |
14 |
| - |
15 |
| -branches: |
16 |
| - except: |
17 |
| - - /^analysis-.*$/ |
| 8 | +php: |
| 9 | +- 7.0 |
| 10 | +- 7.1 |
| 11 | +- 7.2 |
| 12 | +- 7.3 |
18 | 13 |
|
19 | 14 | matrix:
|
20 |
| - fast_finish: true |
21 |
| - include: |
22 |
| - - php: 7.1 |
23 |
| - env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" DEPENDENCIES="doctrine/instantiator:^1.1" |
24 |
| - |
25 |
| - # Test the latest stable release |
26 |
| - - php: 5.4 |
27 |
| - - php: 5.5 |
28 |
| - - php: 5.6 |
29 |
| - - php: 7.0 |
30 |
| - - php: 7.1 |
31 |
| - - php: 7.2 |
32 |
| - env: COVERAGE=true TEST_COMMAND="composer test-ci" DEPENDENCIES="henrikbjorn/phpspec-code-coverage:^1.0" |
| 15 | + fast_finish: true |
| 16 | + |
| 17 | +jobs: |
| 18 | + include: |
| 19 | + - php: 7.0 |
| 20 | + env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" |
| 21 | + - php: 7.2 |
| 22 | + env: COVERAGE=true DEPENDENCIES="leanphp/phpspec-code-coverage" |
| 23 | + script: |
| 24 | + - composer test-ci |
| 25 | + after_success: |
| 26 | + - wget https://scrutinizer-ci.com/ocular.phar |
| 27 | + - php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml --revision=$TRAVIS_COMMIT |
| 28 | + # Test LTS versions |
| 29 | + - php: 7.2 |
| 30 | + env: DEPENDENCIES="dunglas/symfony-lock:^2" |
| 31 | + - php: 7.2 |
| 32 | + env: DEPENDENCIES="dunglas/symfony-lock:^3" |
| 33 | + - php: 7.2 |
| 34 | + env: DEPENDENCIES="dunglas/symfony-lock:^4" |
| 35 | + - php: 7.2 |
| 36 | + env: TEST_COMMAND="./vendor/bin/phpunit" DEPENDENCIES="phpunit/phpunit:^7.5 nyholm/psr7:^1.0" |
| 37 | + |
| 38 | + # Latest dev release |
| 39 | + - php: 7.3 |
| 40 | + env: STABILITY="dev" |
33 | 41 |
|
34 |
| - # Test LTS versions |
35 |
| - - php: 7.1 |
36 |
| - env: DEPENDENCIES="dunglas/symfony-lock:^2" |
37 |
| - - php: 7.1 |
38 |
| - env: DEPENDENCIES="dunglas/symfony-lock:^3" |
39 |
| - - php: 7.1 |
40 |
| - env: DEPENDENCIES="dunglas/symfony-lock:^4" STABILITY="rc" |
41 |
| - |
42 |
| - # Latest dev release |
43 |
| - - php: 7.1 |
44 |
| - env: STABILITY="dev" |
45 |
| - |
46 |
| - allow_failures: |
47 |
| - # Latest dev is allowed to fail. |
48 |
| - - env: STABILITY="dev" |
49 |
| - |
50 | 42 | before_install:
|
51 |
| - - if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi |
52 |
| - - if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi; |
53 |
| - - if ! [ -z "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; fi; |
| 43 | +- if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi |
| 44 | +- if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi; |
| 45 | +- if ! [ -z "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; fi; |
54 | 46 |
|
55 | 47 | install:
|
56 |
| - - cat composer.json |
57 |
| - # To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355 |
58 |
| - - if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi |
59 |
| - - composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction |
| 48 | +- cat composer.json |
| 49 | +# To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355 |
| 50 | +- if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi |
| 51 | +- composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction |
60 | 52 |
|
61 | 53 | script:
|
62 |
| - - composer validate --strict --no-check-lock |
63 |
| - - $TEST_COMMAND |
64 |
| - |
65 |
| -after_success: |
66 |
| - - if [[ $COVERAGE = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi |
67 |
| - - if [[ $COVERAGE = true ]]; then php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml; fi |
| 54 | +- composer validate --strict --no-check-lock |
| 55 | +- composer test |
0 commit comments