This repository has been archived by the owner on Jan 16, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from xtreamwayz/feature/travis-template
Add travis template
- Loading branch information
Showing
1 changed file
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
sudo: false | ||
|
||
language: php | ||
|
||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
|
||
env: | ||
global: | ||
- COMPOSER_ARGS="--no-interaction" | ||
- COVERAGE_DEPS="satooshi/php-coveralls" | ||
|
||
matrix: | ||
include: | ||
- php: 7.1 | ||
env: | ||
- DEPS=lowest | ||
- php: 7.1 | ||
env: | ||
- DEPS=locked | ||
- CS_CHECK=true | ||
- TEST_COVERAGE=true | ||
- php: 7.1 | ||
env: | ||
- DEPS=latest | ||
- php: 7.2 | ||
env: | ||
- DEPS=lowest | ||
- php: 7.2 | ||
env: | ||
- DEPS=locked | ||
- php: 7.2 | ||
env: | ||
- DEPS=latest | ||
allow_failures: | ||
- php: 7.2 | ||
|
||
before_install: | ||
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi | ||
- travis_retry composer self-update | ||
|
||
install: | ||
- travis_retry composer install $COMPOSER_ARGS | ||
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi | ||
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi | ||
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi | ||
- stty cols 120 && composer show | ||
|
||
script: | ||
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi | ||
- if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi | ||
|
||
after_script: | ||
- if [[ $TEST_COVERAGE == 'true' ]]; then composer upload-coverage ; fi | ||
|
||
notifications: | ||
email: false |