Skip to content

Add symfony 4.4 and 5.0 to .travis.yml #1007

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 1 commit into from
Jul 9, 2019
Merged
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
29 changes: 26 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ env:
global:
- SYMFONY_PHPUNIT_DIR=./bin/.phpunit
- SYMFONY_DEPRECATIONS_HELPER=29
- ACTION="install"

matrix:
fast_finish: true
Expand All @@ -20,15 +21,37 @@ matrix:
- php: 7.3
# 'php: nightly' is PHP 8.0
- php: 7.4snapshot
- php: 7.3
env: SYMFONY="4.4.*"
ACTION="update"
- php: 7.3
env: SYMFONY="5.0.*"
ACTION="update"
allow_failures:
- php: 7.4snapshot
- php: 7.3
env: SYMFONY="4.4.*"
ACTION="update"
- php: 7.3
env: SYMFONY="5.0.*"
ACTION="update"

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

install:
- composer install
- php -r "echo ini_get('memory_limit').PHP_EOL;"
# install or update
- composer $ACTION
- ./bin/phpunit install

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