-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
travis: finely segmented matrix, added PhpStan, NCS
- Loading branch information
Showing
1 changed file
with
47 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,66 @@ | ||
language: php | ||
php: | ||
- 7.1 | ||
- 7.2 | ||
- 7.3 | ||
|
||
env: | ||
matrix: | ||
include: | ||
- php: 7.1 | ||
env: coverage=on | ||
before_install: | ||
# turn off XDebug | ||
- phpenv config-rm xdebug.ini || return 0 | ||
|
||
allow_failures: | ||
- php: 7.1 | ||
env: coverage=on | ||
install: | ||
- travis_retry composer install --no-progress --prefer-dist | ||
|
||
script: | ||
- vendor/bin/tester tests -s $coverageArgs | ||
- php temp/code-checker/src/code-checker.php --short-arrays | ||
- vendor/bin/tester tests -s | ||
|
||
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 | ||
- travis_retry composer install --no-interaction --prefer-dist | ||
- travis_retry composer create-project nette/code-checker temp/code-checker ~2.5 --no-interaction | ||
- if [ "$coverage" == "on" ]; then coverageArgs="-p phpdbg --coverage ./coverage.xml --coverage-src ./src"; fi | ||
jobs: | ||
include: | ||
- name: Nette Code Checker | ||
install: | ||
- travis_retry composer create-project nette/code-checker temp/code-checker ^3 --no-progress | ||
script: | ||
- php temp/code-checker/code-checker --strict-types | ||
|
||
|
||
- name: Nette Coding Standard | ||
install: | ||
- travis_retry composer create-project nette/coding-standard temp/coding-standard ^2 --no-progress | ||
script: | ||
- php temp/coding-standard/ecs check src tests --config temp/coding-standard/coding-standard-php71.yml | ||
|
||
|
||
- stage: Static Analysis (informative) | ||
install: | ||
# Install PHPStan | ||
- travis_retry composer create-project phpstan/phpstan-shim temp/phpstan --no-progress | ||
- travis_retry composer install --no-progress --prefer-dist | ||
script: | ||
- php temp/phpstan/phpstan.phar analyse --autoload-file vendor/autoload.php --level 5 src | ||
|
||
|
||
- stage: Code Coverage | ||
script: | ||
- vendor/bin/tester -p phpdbg tests -s --coverage ./coverage.xml --coverage-src ./src | ||
after_script: | ||
- wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar | ||
- php coveralls.phar --verbose --config tests/.coveralls.yml | ||
|
||
|
||
allow_failures: | ||
- stage: Static Analysis (informative) | ||
- stage: Code Coverage | ||
|
||
after_script: | ||
# Report Code Coverage | ||
- > | ||
if [ "$coverage" == "on" ]; then | ||
wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar | ||
&& php coveralls.phar --verbose --config tests/.coveralls.yml | ||
|| true; fi | ||
|
||
sudo: false | ||
|
||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
|
||
notifications: | ||
email: false |