Skip to content

Commit fa1304b

Browse files
committed
minor #1007 Add symfony 4.4 and 5.0 to .travis.yml (Mazarini)
This PR was squashed before being merged into the master branch (closes #1007). Discussion ---------- Add symfony 4.4 and 5.0 to .travis.yml Add 2 tests with failures allowed : For this 2 adds only : - change memory_limit of PHP, - add 'composer install' a for 4.4 and 5.0 only - change stability to dev - change 'composer install' to 'composer update' - suppress last (composer.json change) Commits ------- b698343 Add symfony 4.4 and 5.0 to .travis.yml
2 parents dda8209 + b698343 commit fa1304b

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

.travis.yml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ env:
1111
global:
1212
- SYMFONY_PHPUNIT_DIR=./bin/.phpunit
1313
- SYMFONY_DEPRECATIONS_HELPER=29
14+
- ACTION="install"
1415

1516
matrix:
1617
fast_finish: true
@@ -20,15 +21,37 @@ matrix:
2021
- php: 7.3
2122
# 'php: nightly' is PHP 8.0
2223
- php: 7.4snapshot
24+
- php: 7.3
25+
env: SYMFONY="4.4.*"
26+
ACTION="update"
27+
- php: 7.3
28+
env: SYMFONY="5.0.*"
29+
ACTION="update"
2330
allow_failures:
2431
- php: 7.4snapshot
32+
- php: 7.3
33+
env: SYMFONY="4.4.*"
34+
ACTION="update"
35+
- php: 7.3
36+
env: SYMFONY="5.0.*"
37+
ACTION="update"
2538

2639
before_install:
2740
- '[[ "$TRAVIS_PHP_VERSION" == "7.4snapshot" ]] || phpenv config-rm xdebug.ini'
2841
- composer self-update
42+
# Set memory to max (memory fail)
43+
- '[[ "$ACTION" == "install" ]] || echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini'
44+
# Install before update because of memory usage
45+
- '[[ "$ACTION" == "install" ]] || composer install'
46+
# Set stability to dev to allow 4.4dev and 5.0dev
47+
- '[[ "$ACTION" == "install" ]] || composer config minimum-stability dev'
48+
# Change version of symfony when need
49+
- '[[ "$ACTION" == "install" ]] || composer config extra.symfony.require $SYMFONY'
2950

3051
install:
31-
- composer install
52+
- php -r "echo ini_get('memory_limit').PHP_EOL;"
53+
# install or update
54+
- composer $ACTION
3255
- ./bin/phpunit install
3356

3457
script:
@@ -45,5 +68,5 @@ script:
4568
- ./bin/console security:check
4669
# this checks that Doctrine's mapping configurations are valid
4770
- ./bin/console doctrine:schema:validate --skip-sync -vvv --no-interaction
48-
# Fail CI if the repo is in a dirty state after building assets
49-
- yarn install && yarn encore production && git add --all && git diff --staged --exit-code
71+
# Fail CI if the repo is in a dirty state after building assets (only for current release ie install)
72+
- if [[ "$ACTION" == "install" ]]; then yarn install && yarn encore production && git add --all && git diff --staged --exit-code; fi

0 commit comments

Comments
 (0)