Skip to content

Commit

Permalink
travis: use stages
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Jul 24, 2017
1 parent b4d2e78 commit 98975bf
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 40 deletions.
71 changes: 36 additions & 35 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,52 +4,53 @@ php:
- 7.1
- 7.2

env:
matrix:
include:
- php: 7.0
env: coverage=on
- php: 7.1
env: codingStandard=on
before_install:
# turn off XDebug
- phpenv config-rm xdebug.ini || return 0

allow_failures:
- php: 7.0
env: coverage=on
- php: 7.2
install:
- travis_retry composer install --no-progress --prefer-dist

script:
- vendor/bin/tester tests -s -c tests/php-unix.ini $coverageArgs
- >
if [ "$codingStandard" ]; then
php temp/code-checker/src/code-checker.php --short-arrays --strict-types -i tests/Utils/fixtures.reflection
&& php temp/coding-standard/ecs check src tests --config tests/coding-standard.neon;
fi
- 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
- travis_retry composer install --no-interaction --prefer-dist
# Install Code Checkers
- >
if [ "$codingStandard" ]; 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" ]; then coverageArgs="-p phpdbg --coverage ./coverage.xml --coverage-src ./src"; fi

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
jobs:
include:
- stage: Code Standard Checker
php: 7.1
install:
# Install Nette Code Checker
- travis_retry composer create-project nette/code-checker temp/code-checker ~2 --no-progress
# Install Nette Coding Standard
- travis_retry composer create-project nette/coding-standard temp/coding-standard --no-progress

script:
- php temp/code-checker/src/code-checker.php --short-arrays --strict-types -i tests/Utils/fixtures.reflection
- php temp/coding-standard/ecs check src tests --config tests/coding-standard.neon


- 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:
- php: 7.2
- stage: Code Coverage


sudo: false

cache:
directories:
- $HOME/.composer/cache

notifications:
email: false
5 changes: 0 additions & 5 deletions tests/php-unix.ini

This file was deleted.

0 comments on commit 98975bf

Please sign in to comment.