|
8 | 8 | - 7.2 |
9 | 9 |
|
10 | 10 | env: |
11 | | - - TESTER_PHP_BIN=php |
12 | | - - TESTER_PHP_BIN=php-cgi |
| 11 | + - PHP_BIN=php |
| 12 | + - PHP_BIN=php-cgi |
13 | 13 |
|
14 | | -matrix: |
15 | | - allow_failures: |
16 | | - - php: 7.0 |
17 | | - env: COVERAGE=on |
| 14 | +before_install: |
| 15 | + # turn off XDebug |
| 16 | + - phpenv config-rm xdebug.ini || return 0 |
18 | 17 |
|
19 | | - include: |
20 | | - - php: 7.0 |
21 | | - env: COVERAGE=on |
22 | | - - php: 7.1 |
23 | | - env: CODING_STANDARD=on |
| 18 | +install: |
| 19 | + - travis_retry composer install --no-progress --prefer-dist |
24 | 20 |
|
25 | 21 | script: |
26 | | - - > |
27 | | - if [ "$TESTER_PHP_BIN" ]; then |
28 | | - src/tester -p $TESTER_PHP_BIN --info |
29 | | - && src/tester -p $TESTER_PHP_BIN tests -s $COVERAGE_ARGS |
30 | | - && src/tester -p $TESTER_PHP_BIN -o none tests/fail.phptx; if [ $? -eq 0 ]; then echo "tests/fail.phptx SHOULD FAIL"; exit 1; else echo "fail checked"; fi; |
31 | | - fi |
32 | | - - > |
33 | | - if [ "$CODING_STANDARD" ]; then |
34 | | - php temp/code-checker/src/code-checker.php --short-arrays |
35 | | - && php temp/coding-standard/ecs check src tests --config tests/coding-standard.neon; |
36 | | - fi |
| 22 | + - src/tester -p $PHP_BIN --info |
| 23 | + - src/tester -p $PHP_BIN tests -s |
| 24 | + - src/tester -p $PHP_BIN -o none tests/fail.phptx; if [ $? -eq 0 ]; then echo "tests/fail.phptx SHOULD FAIL"; exit 1; else echo "fail checked"; fi; |
37 | 25 |
|
38 | 26 | after_failure: |
39 | 27 | # Print *.actual content |
40 | 28 | - for i in $(find tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done |
41 | 29 |
|
42 | | -before_script: |
43 | | - # Install Code Checkers |
44 | | - - > |
45 | | - if [ "$CODING_STANDARD" ]; then |
46 | | - travis_retry composer create-project nette/code-checker temp/code-checker ~2 --no-interaction; |
47 | | - travis_retry composer create-project nette/coding-standard temp/coding-standard --no-interaction; |
48 | | - fi |
| 30 | +jobs: |
| 31 | + include: |
| 32 | + - stage: Code Standard Checker |
| 33 | + php: 7.1 |
| 34 | + install: |
| 35 | + # Install Nette Code Checker |
| 36 | + - travis_retry composer create-project nette/code-checker temp/code-checker ~2 --no-progress |
| 37 | + # Install Nette Coding Standard |
| 38 | + - travis_retry composer create-project nette/coding-standard temp/coding-standard --no-progress |
| 39 | + script: |
| 40 | + - php temp/code-checker/src/code-checker.php --short-arrays |
| 41 | + - php temp/coding-standard/ecs check src tests --config tests/coding-standard.neon; |
| 42 | + |
49 | 43 |
|
50 | | - - if [ "$COVERAGE" ]; then TESTER_PHP_BIN=phpdbg; COVERAGE_ARGS="--coverage ./coverage.xml --coverage-src ./src"; fi |
| 44 | + - stage: Code Coverage |
| 45 | + php: 7.1 |
| 46 | + script: |
| 47 | + - src/tester -p phpdbg tests -s --coverage ./coverage.xml --coverage-src ./src |
| 48 | + after_script: |
| 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 | + |
| 52 | + |
| 53 | + allow_failures: |
| 54 | + - stage: Code Coverage |
51 | 55 |
|
52 | | -after_script: |
53 | | - # Report Code Coverage |
54 | | - - > |
55 | | - if [ "$COVERAGE" ]; then |
56 | | - wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar |
57 | | - && php coveralls.phar --verbose --config tests/.coveralls.yml; |
58 | | - fi |
59 | 56 |
|
60 | 57 | sudo: false |
61 | 58 |
|
62 | 59 | cache: |
63 | 60 | directories: |
64 | 61 | - $HOME/.composer/cache |
| 62 | + |
| 63 | +notifications: |
| 64 | + email: false |
0 commit comments