From 8b993d642499d992e88d00dd0773ad82ba54863a Mon Sep 17 00:00:00 2001 From: David Grudl <david@grudl.com> Date: Mon, 24 Jul 2017 12:29:17 +0200 Subject: [PATCH] travis: use stages --- .travis.yml | 70 +++++++++++++++++++++++----------------------- tests/php-unix.ini | 5 ---- 2 files changed, 35 insertions(+), 40 deletions(-) delete mode 100644 tests/php-unix.ini diff --git a/.travis.yml b/.travis.yml index 010956d83..4aab55b97 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,52 +4,52 @@ 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-interaction --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-interaction + # Install Nette Coding Standard + - travis_retry composer create-project nette/coding-standard temp/coding-standard --no-interaction + 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 diff --git a/tests/php-unix.ini b/tests/php-unix.ini deleted file mode 100644 index 3cdf09543..000000000 --- a/tests/php-unix.ini +++ /dev/null @@ -1,5 +0,0 @@ -[PHP] -;extension_dir = "./ext" - -[Zend] -;zend_extension="./ext/zend_extension"