File tree Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -11,32 +11,43 @@ matrix:
11
11
env : dependencies="--prefer-lowest --prefer-stable"
12
12
- php : 7.0
13
13
env : coverage=on
14
+ - php : 7.1
15
+ env : codingStandard=on
14
16
15
17
allow_failures :
16
18
- php : 7.0
17
19
env : coverage=on
18
20
19
21
script :
20
22
- vendor/bin/tester tests -s $coverageArgs
21
- - php temp/code-checker/src/code-checker.php --short-arrays
23
+ - >
24
+ if [ "$codingStandard" ]; then
25
+ php temp/code-checker/src/code-checker.php --short-arrays
26
+ && php temp/coding-standard/ecs check src tests --config temp/coding-standard/coding-standard-php56.neon;
27
+ fi
22
28
23
29
after_failure :
24
30
# Print *.actual content
25
31
- for i in $(find tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done
26
32
27
33
before_script :
28
- # Install Nette Tester & Code Checker
34
+ # Install Nette Tester
29
35
- travis_retry composer update --no-interaction --prefer-dist $dependencies
30
- - travis_retry composer create-project nette/code-checker temp/code-checker ~2.5 --no-interaction
31
- - if [ "$coverage" == "on" ]; then coverageArgs="-p phpdbg --coverage ./coverage.xml --coverage-src ./src"; fi
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
+ fi
42
+ - if [ "$coverage" ]; then coverageArgs="-p phpdbg --coverage ./coverage.xml --coverage-src ./src"; fi
32
43
33
44
after_script :
34
45
# Report Code Coverage
35
46
- >
36
- if [ "$coverage" == "on" ]; then
47
+ if [ "$coverage" ]; then
37
48
wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar
38
- && php coveralls.phar --verbose --config tests/.coveralls.yml
39
- || true; fi
49
+ && php coveralls.phar --verbose --config tests/.coveralls.yml;
50
+ fi
40
51
41
52
sudo : false
42
53
You can’t perform that action at this time.
0 commit comments