-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
30 additions
and
21 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,40 +1,49 @@ | ||
language: php | ||
php: | ||
- 7.1 | ||
- 7.2 | ||
- 7.3 | ||
|
||
matrix: | ||
include: | ||
- php: 7.0 | ||
env: coverage=on | ||
before_install: | ||
# turn off XDebug | ||
- phpenv config-rm xdebug.ini || return 0 | ||
|
||
allow_failures: | ||
- php: 7.0 | ||
env: coverage=on | ||
install: | ||
- travis_retry composer install --no-progress --prefer-dist | ||
|
||
script: | ||
- vendor/bin/tester tests -s -p php $coverageArgs | ||
- php code-checker/src/code-checker.php | ||
- vendor/bin/tester tests -s -p php | ||
|
||
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 code-checker ~2.5 --no-interaction | ||
- if [ "$coverage" ]; 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 ~2 --no-progress | ||
script: | ||
- php temp/code-checker/code-checker --strict-types | ||
|
||
|
||
- 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: Code Coverage | ||
|
||
after_script: | ||
# Report Code Coverage | ||
- > | ||
if [ "$coverage" ]; then | ||
wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar | ||
&& php coveralls.phar --verbose --config tests/.coveralls.yml; | ||
fi | ||
|
||
sudo: false | ||
|
||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
|
||
notifications: | ||
email: false |