Skip to content

Commit

Permalink
Merge pull request #15 from SymfonyTest/Nyholm-patch-1
Browse files Browse the repository at this point in the history
Adding a better travis file
  • Loading branch information
Nyholm authored Feb 4, 2018
2 parents e4b0fd2 + 7086237 commit 59a5c83
Showing 1 changed file with 50 additions and 18 deletions.
68 changes: 50 additions & 18 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,31 +101,63 @@ You want Travis to run against each currently supported LTS version of Symfony (

```yaml
language: php
sudo: false
cache:
directories:
- $HOME/.composer/cache/files
- $HOME/symfony-bridge/.phpunit

php:
- 5.5
- 5.6
- 7.0
- 7.1
env:
global:
- TEST_COMMAND="vendor/bin/phpunit"
matrix:
- SYMFONY_VERSION=4.*
- SYMFONY_VERSION=3.4.*
- SYMFONY_VERSION=2.7.*
global:
- PHPUNIT_FLAGS=""
- SYMFONY_PHPUNIT_DIR="$HOME/symfony-bridge/.phpunit"

matrix:
fast_finish: true
include:
- php: 5.5
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_VERSION=2.7.* TEST_COMMAND="vendor/bin/phpunit --coverage-text --coverage-clover=build/coverage.xml"
fast_finish: true
include:
# Minimum supported dependencies with the latest and oldest PHP version
- php: 7.2
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak_vendors"
- php: 5.5
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak_vendors"

# Test the latest stable release
- php: 5.5
- php: 5.6
- php: 7.0
- php: 7.1
- php: 7.2
env: COVERAGE=true PHPUNIT_FLAGS="-v --testsuite main --coverage-text --coverage-clover=build/coverage.xml"

- php: 7.1
env: DEPENDENCIES="dunglas/symfony-lock:^2"
- php: 7.1
env: DEPENDENCIES="dunglas/symfony-lock:^3"
- php: 7.1
env: DEPENDENCIES="dunglas/symfony-lock:^4"

# Latest commit to master
- php: 7.2
env: STABILITY="dev"

allow_failures:
# Dev-master is allowed to fail.
- env: STABILITY="dev"

before_install:
- if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi
- if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi;
- composer require --no-update symfony/phpunit-bridge:^4.0 ${DEPENDENCIES}

install:
- composer require symfony/symfony:${SYMFONY_VERSION} --no-update
- travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction
# To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355
- if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi
- composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction
- ./vendor/bin/simple-phpunit install

script:
- $TEST_COMMAND
- composer validate --strict --no-check-lock
- ./vendor/bin/simple-phpunit $PHPUNIT_FLAGS

```

0 comments on commit 59a5c83

Please sign in to comment.