Skip to content

Commit

Permalink
travis
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Mar 28, 2019
1 parent 323fc7f commit e8a1a65
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ sudo: false

php:
- 5.6
- 7.0
- 7.3

env:
Expand All @@ -17,30 +16,38 @@ matrix:
env: PREFER_LOWEST=1

- php: 7.2
env: PHPSTAN=1 DEFAULT=0
env: CHECKS=1 DEFAULT=0

- php: 7.2
env: PHPCS=1 DEFAULT=0

- php: 7.2
- php: 7.1
env: CODECOVERAGE=1 DEFAULT=0

fast_finish: true

before_install:
- phpenv config-rm xdebug.ini

before_script:
- if [[ $PREFER_LOWEST != 1 ]]; then composer install --prefer-source --no-interaction ; fi
- if [[ $PREFER_LOWEST == 1 ]]; then composer update --prefer-lowest --prefer-stable --prefer-dist --no-interaction ; fi
- if [[ $PREFER_LOWEST == 1 ]]; then composer require --dev dereuromark/composer-prefer-lowest:dev-master; fi

- if [[ $PHPCS != 1 ]]; then composer require --dev phpunit/phpunit:"^5.7.14|^6.0"; fi
- if [[ $CHECKS != 1 ]]; then composer require --dev phpunit/phpunit:"^5.7.14|^6.0"; fi

script:
- if [[ $DEFAULT == 1 ]]; then vendor/bin/phpunit; fi
- if [[ $PHPSTAN == 1 ]]; then composer phpstan-setup && composer phpstan; fi
- if [[ $PHPCS == 1 ]]; then composer cs-check; fi
- if [[ $CODECOVERAGE == 1 ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=clover.xml; fi

- if [[ $PREFER_LOWEST == 1 ]]; then vendor/bin/validate-prefer-lowest; fi

- if [[ $CHECKS == 1 ]]; then composer phpstan-setup && composer phpstan; fi
- if [[ $CHECKS == 1 ]]; then composer cs-check; fi

after_success:
- if [[ $CODECOVERAGE == 1 ]]; then bash <(curl -s https://codecov.io/bash); fi

- if [[ $CODECOVERAGE == 1 ]]; then vendor/bin/phpunit --coverage-clover=clover.xml || true; fi
- if [[ $CODECOVERAGE == 1 ]]; then wget -O codecov.sh https://codecov.io/bash; fi
- if [[ $CODECOVERAGE == 1 ]]; then bash codecov.sh; fi
cache:
directories:
- $HOME/.composer/cache

notifications:
email: false

0 comments on commit e8a1a65

Please sign in to comment.