Skip to content

Commit 637d01c

Browse files
committed
Migrate to Travis CI job sequence
1 parent 720a0cd commit 637d01c

File tree

1 file changed

+49
-47
lines changed

1 file changed

+49
-47
lines changed

.travis.yml

Lines changed: 49 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,62 +2,64 @@ language: php
22
sudo: false
33

44
cache:
5-
directories:
6-
- $HOME/.composer/cache/files
5+
directories:
6+
- $HOME/.composer/cache/files
77

88
env:
9-
global:
10-
- TEST_COMMAND="composer test"
9+
global:
10+
- TEST_COMMAND="composer test"
1111

1212
branches:
13-
except:
14-
- /^analysis-.*$/
13+
except:
14+
- /^analysis-.*$/
15+
16+
php:
17+
- 7.0
18+
- 7.1
19+
- 7.2
1520

1621
matrix:
17-
fast_finish: true
18-
include:
19-
- php: 7.0
20-
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
21-
22-
# Test the latest stable release
23-
- php: 7.0
24-
- php: 7.1
25-
- php: 7.2
26-
- php: 7.2
27-
env: COVERAGE=true TEST_COMMAND="composer test-ci" DEPENDENCIES="leanphp/phpspec-code-coverage"
28-
29-
# Test LTS versions
30-
- php: 7.1
31-
env: DEPENDENCIES="dunglas/symfony-lock:^2"
32-
- php: 7.1
33-
env: DEPENDENCIES="dunglas/symfony-lock:^3"
34-
- php: 7.1
35-
env: DEPENDENCIES="dunglas/symfony-lock:^4" STABILITY="rc"
36-
37-
# Latest dev release
38-
- php: 7.1
39-
env: STABILITY="dev"
40-
41-
allow_failures:
42-
- php: 7.3
43-
sudo: required
44-
- env: STABILITY="dev"
22+
fast_finish: true
23+
allow_failures:
24+
- php: 7.3
25+
- env:
26+
STABILITY: "dev"
27+
28+
jobs:
29+
include:
30+
- php: 7.0
31+
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
32+
- php: 7.2
33+
env: COVERAGE=true DEPENDENCIES="leanphp/phpspec-code-coverage"
34+
script:
35+
- composer test-ci
36+
after_success:
37+
- wget https://scrutinizer-ci.com/ocular.phar
38+
- php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml --revision=$TRAVIS_COMMIT
39+
# Test LTS versions
40+
- php: 7.1
41+
env: DEPENDENCIES="dunglas/symfony-lock:^2"
42+
- php: 7.1
43+
env: DEPENDENCIES="dunglas/symfony-lock:^3"
44+
- php: 7.1
45+
env: DEPENDENCIES="dunglas/symfony-lock:^4" STABILITY="rc"
46+
47+
# Latest dev release
48+
- php: 7.3
49+
sudo: required
50+
- env: STABILITY="dev"
4551

4652
before_install:
47-
- if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi
48-
- if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi;
49-
- if ! [ -z "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; fi;
53+
- if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi
54+
- if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi;
55+
- if ! [ -z "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; fi;
5056

5157
install:
52-
- cat composer.json
53-
# To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355
54-
- if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi
55-
- composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction
58+
- cat composer.json
59+
# To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355
60+
- if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi
61+
- composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction
5662

5763
script:
58-
- composer validate --strict --no-check-lock
59-
- $TEST_COMMAND
60-
61-
after_success:
62-
- if [[ $COVERAGE = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
63-
- if [[ $COVERAGE = true ]]; then php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml; fi
64+
- composer validate --strict --no-check-lock
65+
- composer test

0 commit comments

Comments
 (0)