Skip to content

Commit 2446ba4

Browse files
committed
travis: tested using Nette Coding Standard
1 parent 389c41c commit 2446ba4

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.travis.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,34 @@ matrix:
99
env: dependencies="--prefer-lowest --prefer-stable"
1010
- php: 7.1
1111
env: coverage=on
12+
- php: 7.1
13+
env: codingStandard=on
1214

1315
allow_failures:
1416
- php: 7.1
1517
env: coverage=on
1618

1719
script:
1820
- vendor/bin/tester tests -s -c tests/php-unix.ini $coverageArgs
19-
- php temp/code-checker/src/code-checker.php --short-arrays --strict-types
21+
- >
22+
if [ "$codingStandard" == "on" ]; then
23+
php temp/code-checker/src/code-checker.php --short-arrays --strict-types;
24+
php temp/coding-standard/ecs check src tests --config temp/coding-standard/coding-standard-php71.neon;
25+
fi
2026
2127
after_failure:
2228
# Print *.actual content
2329
- for i in $(find tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done
2430

2531
before_script:
26-
# Install Nette Tester & Code Checker
32+
# Install Nette Tester
2733
- travis_retry composer update --no-interaction --prefer-dist $dependencies
28-
- travis_retry composer create-project nette/code-checker temp/code-checker ~2.8 --no-interaction
34+
# Install Code Checkers
35+
- >
36+
if [ "$codingStandard" == "on" ]; then
37+
travis_retry composer create-project nette/code-checker temp/code-checker ~2 --no-interaction;
38+
travis_retry composer create-project nette/coding-standard temp/coding-standard --no-interaction;
39+
fi
2940
- if [ "$coverage" == "on" ]; then coverageArgs="-p phpdbg --coverage ./coverage.xml --coverage-src ./src"; fi
3041

3142
# Create databases.ini

0 commit comments

Comments
 (0)