Skip to content

Commit 58b2b64

Browse files
committed
travis: use stages
1 parent e0ae872 commit 58b2b64

File tree

2 files changed

+42
-43
lines changed

2 files changed

+42
-43
lines changed

.travis.yml

Lines changed: 42 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,55 +3,59 @@ php:
33
- 7.1
44
- 7.2
55

6-
env:
7-
matrix:
8-
include:
9-
- php: 7.1
10-
env: dependencies="--prefer-lowest --prefer-stable"
11-
- php: 7.1
12-
env: coverage=on
13-
- php: 7.1
14-
env: codingStandard=on
6+
before_install:
7+
# turn off XDebug
8+
- phpenv config-rm xdebug.ini || return 0
159

16-
allow_failures:
17-
- php: 7.1
18-
env: coverage=on
10+
install:
11+
- travis_retry composer install --no-interaction --prefer-dist
1912

2013
script:
21-
- vendor/bin/tester tests -s -c tests/php-unix.ini $coverageArgs
22-
- >
23-
if [ "$codingStandard" ]; then
24-
php temp/code-checker/src/code-checker.php --short-arrays --strict-types
25-
&& php temp/coding-standard/ecs check src tests examples --config temp/coding-standard/coding-standard-php71.neon
26-
&& grunt --gruntfile=tests/netteForms/Gruntfile.js test;
27-
fi
14+
- vendor/bin/tester tests -s
2815

2916
after_failure:
3017
# Print *.actual content
3118
- for i in $(find tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done
3219

33-
before_script:
34-
# Install Nette Tester
35-
- travis_retry composer update --no-interaction --prefer-dist $dependencies
36-
# Install Code Checkers
37-
- >
38-
if [ "$codingStandard" ]; then
39-
travis_retry composer create-project nette/code-checker temp/code-checker ~2 --no-interaction;
40-
travis_retry composer create-project nette/coding-standard temp/coding-standard --no-interaction;
41-
npm install -g grunt-cli; cd tests/netteForms; npm install; cd ../..;
42-
fi
43-
- if [ "$coverage" ]; then coverageArgs="-p phpdbg --coverage ./coverage.xml --coverage-src ./src"; fi
44-
45-
after_script:
46-
# Report Code Coverage
47-
- >
48-
if [ "$coverage" ]; then
49-
wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar
50-
&& php coveralls.phar --verbose --config tests/.coveralls.yml;
51-
fi
20+
jobs:
21+
include:
22+
- stage: Lowest Dependencies
23+
install:
24+
- travis_retry composer update --no-interaction --prefer-dist --prefer-lowest --prefer-stable
25+
26+
27+
- stage: Code Standard Checker
28+
php: 7.1
29+
install:
30+
# Install Nette Code Checker
31+
- travis_retry composer create-project nette/code-checker temp/code-checker ~2 --no-interaction
32+
# Install Nette Coding Standard
33+
- travis_retry composer create-project nette/coding-standard temp/coding-standard --no-interaction
34+
# Install Grunt
35+
- npm install -g grunt-cli; cd tests/netteForms; npm install; cd ../..
36+
script:
37+
- php temp/code-checker/src/code-checker.php --short-arrays --strict-types
38+
- php temp/coding-standard/ecs check src tests examples --config temp/coding-standard/coding-standard-php71.neon
39+
- grunt --gruntfile=tests/netteForms/Gruntfile.js test
40+
41+
42+
- stage: Code Coverage
43+
script:
44+
- vendor/bin/tester -p phpdbg tests -s --coverage ./coverage.xml --coverage-src ./src
45+
after_script:
46+
- wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar
47+
- php coveralls.phar --verbose --config tests/.coveralls.yml
48+
49+
50+
allow_failures:
51+
- stage: Code Coverage
52+
5253

5354
sudo: false
5455

5556
cache:
5657
directories:
5758
- $HOME/.composer/cache
59+
60+
notifications:
61+
email: false

tests/php-unix.ini

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)