Skip to content

Commit

Permalink
travis: tested using Nette Coding Standard
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Jul 12, 2017
1 parent bd3b385 commit 2e29386
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,34 @@ matrix:
env: dependencies="--prefer-lowest --prefer-stable" PHP_BIN=php
- php: 7.1
env: coverage=on
- php: 7.1
env: codingStandard=on

allow_failures:
- php: 7.1
env: coverage=on

script:
- vendor/bin/tester -p $PHP_BIN tests -s $coverageArgs
- php temp/code-checker/src/code-checker.php --short-arrays --strict-types
- if [ "$PHP_BIN" ]; then vendor/bin/tester -p $PHP_BIN tests -s $coverageArgs; fi
- >
if [ "$codingStandard" == "on" ]; then
php temp/code-checker/src/code-checker.php --short-arrays --strict-types;
php temp/coding-standard/ecs check src tests --config tests/coding-standard.neon;
fi
after_failure:
# Print *.actual content
- for i in $(find tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done

before_script:
# Install Nette Tester & Code Checker
# Install Nette Tester
- travis_retry composer update --no-interaction --prefer-dist $dependencies
- travis_retry composer create-project nette/code-checker temp/code-checker ~2.8 --no-interaction
# Install Code Checkers
- >
if [ "$codingStandard" == "on" ]; then
travis_retry composer create-project nette/code-checker temp/code-checker ~2 --no-interaction;
travis_retry composer create-project nette/coding-standard temp/coding-standard --no-interaction;
fi
- if [ "$coverage" == "on" ]; then PHP_BIN=phpdbg; coverageArgs="--coverage ./coverage.xml --coverage-src ./src"; fi

after_script:
Expand Down
7 changes: 7 additions & 0 deletions tests/coding-standard.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
includes:
- ../temp/coding-standard/coding-standard-php71.neon

parameters:
skip:
PhpCsFixer\Fixer\FunctionNotation\NoUnreachableDefaultArgumentValueFixer:
- tests/UI/Presenter.paramChecking.phpt # intentionally for testing

0 comments on commit 2e29386

Please sign in to comment.