Skip to content

Commit

Permalink
travis: finely segmented matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Feb 6, 2019
1 parent a784303 commit 5e46d5f
Showing 1 changed file with 30 additions and 21 deletions.
51 changes: 30 additions & 21 deletions .travis.yml
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

0 comments on commit 5e46d5f

Please sign in to comment.