Skip to content

Improved travis config to test on sf4 #161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Dec 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 49 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,43 +9,68 @@ branches:
- /^analysis-.*$/
- /^patch-.*$/

php:
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2

env:
global:
- TEST_COMMAND="composer test"
- SYMFONY_PHPUNIT_VERSION="6.3"
- SYMFONY_DEPRECATIONS_HELPER="weak" # Temporary, To be removed

matrix:
fast_finish: true
include:
- php: 5.5
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci"
- php: 7.1
env: DEPENDENCIES=dev
# Test against LTS versions
- php: 7.0
env: SYMFONY_VERSION=2.7.*
- php: 7.0
env: SYMFONY_VERSION=2.8.* PACKAGES=twig/twig:^1.34
- php: 7.0
env: SYMFONY_VERSION=2.8.*
fast_finish: true
include:
# Test with lowest dependencies
- php: 7.1
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak" SYMFONY_PHPUNIT_VERSION="5.7"
- php: 5.5
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak" SYMFONY_PHPUNIT_VERSION="5.7"

# Test the latest stable release
- php: 5.5
env: SYMFONY_PHPUNIT_VERSION="5.7"
- php: 5.6
env: SYMFONY_PHPUNIT_VERSION="5.7"
- php: 7.0
- php: 7.1
- php: 7.2
env: COVERAGE=true TEST_COMMAND="composer test-ci"

# Force some major versions of Symfony
- php: 7.2
env: DEPENDENCIES="dunglas/symfony-lock:^2 symfony/property-access:^2.8"
- php: 7.2
env: DEPENDENCIES="dunglas/symfony-lock:^3"
- php: 7.2
env: DEPENDENCIES="dunglas/symfony-lock:^4"
- php: 7.0
env: DEPENDENCIES="dunglas/symfony-lock:^2 twig/twig:^1.34 symfony/property-access:^2.8"

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

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

before_install:
- if [ "$SYMFONY_VERSION" != "" ]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi;
- if [ "$PACKAGES" != "" ]; then composer require $PACKAGES --no-update; fi;
- if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi;
- if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi
- if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi;
- if ! [ -z "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; fi;

install:
- 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:
- composer validate --strict --no-check-lock
- $TEST_COMMAND

after_success:
- if [[ $COVERAGE = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [[ $COVERAGE = true ]]; then php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml; fi

after_script:
- wget http://tnyholm.se/reporter.phar
- php reporter.phar build:upload
13 changes: 6 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"php-translation/extractor": "^1.2"
},
"require-dev": {
"phpunit/phpunit": "^4.8.36 || ^5.5 || ^6.2",
"symfony/phpunit-bridge": "^3.4 || ^4.0",
"php-translation/translator": "^0.1",
"php-http/curl-client": "^1.7",
"php-http/message": "^1.6",
Expand All @@ -34,10 +34,11 @@
"symfony/templating": "^2.7 || ^3.0 || ^4.0",
"symfony/dependency-injection": "^2.7 || ^3.0 || ^4.0",
"symfony/web-profiler-bundle": "^2.7 || ^3.0 || ^4.0",
"matthiasnoback/symfony-dependency-injection-test": "^1.0 || ^2.0",
"matthiasnoback/symfony-dependency-injection-test": "^1.2 || ^2.3",
"matthiasnoback/symfony-config-test": "^2.2 || ^3.1",
"guzzlehttp/psr7": "^1.4",
"nyholm/nsa": "^1.1",
"nyholm/symfony-bundle-test": "^1.2"
"nyholm/symfony-bundle-test": "^1.2.3"
},
"suggest": {
"php-http/httplug-bundle": "To easier configure your httplug clients."
Expand All @@ -46,11 +47,9 @@
"psr-4": { "Translation\\Bundle\\": "" }
},
"scripts": {
"test": "vendor/bin/phpunit",
"test-ci": "vendor/bin/phpunit --coverage-text --coverage-clover=build/coverage.xml"
"test": "vendor/bin/simple-phpunit",
"test-ci": "vendor/bin/simple-phpunit --coverage-text --coverage-clover=build/coverage.xml"
},
"minimum-stability": "dev",
"prefer-stable": true,
"extra": {
"branch-alias": {
"dev-master": "0.4-dev"
Expand Down