Skip to content

Commit

Permalink
CI: update travis
Browse files Browse the repository at this point in the history
  • Loading branch information
f3l1x committed Nov 2, 2018
1 parent d4c006e commit cd30cf0
Showing 1 changed file with 49 additions and 38 deletions.
87 changes: 49 additions & 38 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,65 @@
language: php
php:
- 7.1
- 7.2
- 7.1
- 7.2
- 7.3

before_install:
# Turn off XDebug
- phpenv config-rm xdebug.ini || return 0

install:
# Composer
- travis_retry composer install --no-progress --prefer-dist
# Composer
- travis_retry composer install --no-progress --prefer-dist

script:
# PhpUnit
- composer run-script phpunit
# Check all dependencies at master are up-to-date when running regular builds
- |
if [[ $TRAVIS_EVENT_TYPE == "cron" && $TRAVIS_BRANCH == "master" ]]; then
composer outdated --direct --strict
fi
# Tests
- composer run-script phpunit

after_failure:
# Print *.actual content
- for i in $(find tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done

jobs:
include:
- env: title="Lowest Dependencies 7.1"
php: 7.1
install:
- travis_retry composer update --no-progress --prefer-dist --prefer-lowest
script:
- composer run-script phpunit

- stage: Quality Assurance
php: 7.1
script:
- composer run-script qa

- stage: Test Coverage
php: 7.1
script:
- composer run-script coverage
after_script:
- wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar
- php coveralls.phar --verbose --config tests/.coveralls.yml

- stage: Phpstan
php: 7.1
script:
- composer run-script phpstan-install
- composer run-script phpstan
- env: title="Lowest Dependencies 7.1"
php: 7.1
install:
- travis_retry composer update --no-progress --prefer-dist --prefer-lowest
script:
- composer run-script phpunit

allow_failures:
- stage: Test Coverage
- stage: Phpstan
- stage: Quality Assurance
php: 7.1
script:
- composer run-script qa

after_failure:
# Print *.actual content
- for i in $(find tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done
- stage: Phpstan
php: 7.1
script:
- composer run-script phpstan-install
- composer run-script phpstan

- stage: Test Coverage
if: branch = master AND type = push
php: 7.1
script:
- composer run-script coverage
after_script:
- wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar
- php php-coveralls.phar --verbose --config tests/.coveralls.yml

allow_failures:
- stage: Test Coverage

sudo: false

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

0 comments on commit cd30cf0

Please sign in to comment.