-
Notifications
You must be signed in to change notification settings - Fork 50
Updated travis yml to properly test different symfony versions #221
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
Changes from 12 commits
47c6dda
7528644
a90e79d
41e8a04
3457ef6
493377a
788e262
47a1947
d2d7a08
12a0de1
f9d6078
c7ade50
3d4a53e
1d2cb65
64ed481
cfe423b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,16 +6,10 @@ cache: | |
directories: | ||
- $HOME/.composer/cache/files | ||
|
||
php: | ||
- 5.5 | ||
- 5.6 | ||
- 7.0 | ||
- 7.1 | ||
- 7.2 | ||
|
||
env: | ||
global: | ||
- TEST_COMMAND="composer test" | ||
- SYMFONY_PHPUNIT_VERSION="6.3" | ||
|
||
branches: | ||
except: | ||
|
@@ -24,26 +18,47 @@ branches: | |
matrix: | ||
fast_finish: true | ||
include: | ||
# Minimum supported PHP and Symfony version | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here PHP is the highest available version There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, see symfony/symfony-docs#8701 (comment) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So maybe a comment like Test latest PHP version with lowest dependencies would be more accurate. |
||
- php: 7.1 | ||
env: DEPENDENCIES="minimum" COVERAGE=true TEST_COMMAND="composer test-ci" SYMFONY_DEPRECATIONS_HELPER="weak" SYMFONY_PHPUNIT_VERSION="5.7" | ||
|
||
# Test the latest stable release | ||
- php: 5.5 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure you need this job. There are two other jobs making use of PHP 5.5. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm, maybe you are correct. |
||
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci" | ||
- php: 7.2 | ||
env: DEPENDENCIES=dev | ||
- php: hhvm | ||
dist: trusty | ||
# Test against LTS versions | ||
env: SYMFONY_PHPUNIT_VERSION="5.7" | ||
- php: 5.6 | ||
env: SYMFONY_PHPUNIT_VERSION="5.7" | ||
- php: 7.0 | ||
env: SYMFONY_VERSION=2.8.* | ||
- php: 7.1 | ||
- php: 7.2 | ||
|
||
# Test LTS versions | ||
- php: 5.5 | ||
env: DEPENDENCIES="symfony/lts:^2" | ||
- php: 5.5 | ||
env: DEPENDENCIES="symfony/lts:^3" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This allows some dependencies to be installed in their 2.x version. Is that wanted? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, That is fine. |
||
|
||
# Latest commit to master | ||
- php: 7.1 | ||
env: DEPENDENCIES="dev" | ||
|
||
allow_failures: | ||
# Latest beta is allowed to fail. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you |
||
- php: 7.1 | ||
env: DEPENDENCIES="dev" | ||
|
||
before_install: | ||
- if [ "$SYMFONY_VERSION" != "" ]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi; | ||
- if [ "$DEPENDENCIES" = "dev" ]; then sed -i '/prefer-stable/d' composer.json; fi; | ||
- if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi; | ||
- if [ $COVERAGE != true ]; then phpenv config-rm xdebug.ini; fi; | ||
- if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi | ||
- if [ "$DEPENDENCIES" = "minimum" ]; then COMPOSER_FLAGS="--prefer-stable --prefer-lowest"; fi; | ||
- if [ "$DEPENDENCIES" = "dev" ]; then composer config minimum-stability dev; fi; | ||
- if [[ $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 | ||
|
||
script: | ||
- composer validate --strict --no-check-lock | ||
- $TEST_COMMAND | ||
|
||
after_success: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,15 +33,14 @@ | |
"symfony/dependency-injection": "^2.8.3 || ^3.0.3" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.1", | ||
"phpunit/php-token-stream": "^1.1.8", | ||
"php-http/curl-client": "^1.0", | ||
"php-http/socket-client": "^1.0", | ||
"php-http/guzzle6-adapter": "^1.1.1", | ||
"php-http/react-adapter": "^0.2.1", | ||
"php-http/buzz-adapter": "^0.3", | ||
"php-http/mock-client": "^1.0", | ||
"symfony/phpunit-bridge": "^3.2", | ||
"symfony/phpunit-bridge": "^3.4@rc || ^4.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 3.4 will allow PHPunit6. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that should be possible with older versions of the bridge too There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm.. I maybe got confused by this PR symfony/symfony#23952 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That was merged into the |
||
"symfony/twig-bundle": "^2.8 || ^3.0", | ||
"symfony/twig-bridge": "^2.8 || ^3.0", | ||
"symfony/web-profiler-bundle": "^2.8 || ^3.0", | ||
|
@@ -50,7 +49,7 @@ | |
"symfony/browser-kit": "^2.8 || ^3.0", | ||
"symfony/dom-crawler": "^2.8 || ^3.0", | ||
"polishsymfonycommunity/symfony-mocker-container": "^1.0", | ||
"matthiasnoback/symfony-dependency-injection-test": "^1.0 || ^2.0", | ||
"matthiasnoback/symfony-dependency-injection-test": "^1.1 || ^2.0", | ||
"nyholm/nsa": "^1.1" | ||
}, | ||
"conflict": { | ||
|
@@ -69,8 +68,8 @@ | |
] | ||
}, | ||
"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" | ||
}, | ||
"extra": { | ||
"branch-alias": { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did tests fail without exposing this environment variable? The bridge should pick the best PHPUnit version automatically if you don't do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it did. It was some issues with mattiasnoback/config-test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you more details on those issues? I could look at it and maybe fix those in the library and so remove those variables from our travis file.