.travis.yml
dist: bionic
os: linux
language: php
services:
- docker
git:
depth: 5
cache:
directories:
- $HOME/.composer/cache
php:
- 7.2
env:
- CAN_FAIL=false
stages:
- analysis
- test
jobs:
allow_failures:
env:
- SYMFONY_VERSION="^5.1"
- CAN_FAIL=true
include:
- stage: analysis
name: "php-cs-fixer"
before_install:
- make pull-docker-image
script:
- make php-cs-fixer-dry-run
- name: "phpstan"
before_install:
- make pull-docker-image
- echo "memory_limit = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
install:
- make composer-install
script:
- make phpstan
- stage: test
name: "PHP 7.2 / Symfony 3.4"
php: 7.2
env:
- SYMFONY_VERSION="^3.4"
before_install:
- phpenv config-rm xdebug.ini
- echo "memory_limit = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
install:
- make composer-require-symfony-version
- make composer-install
script:
- make tests
- name: "PHP 7.3 / Symfony 4.4 / Code coverage"
php: 7.3
env:
- SYMFONY_VERSION="^4.4"
# Only send code coverage to Code Climate for the current versions of PHP and Symfony LTS
# https://github.com/doctrine/doctrine2/blob/3570f4a49afc7e98fed71e0596dded6a39d4fd7b/.travis.yml#L16
before_install:
- echo "memory_limit = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- DEPENDENCY="codeclimate/php-test-reporter:~0.3 satooshi/php-coveralls:~1.0"
install:
- make composer-require-symfony-version
- make composer-install
script:
- make phpspec
- php ./vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml
- make behat
after_success:
- php ./vendor/bin/test-reporter
- travis_retry php vendor/bin/coveralls -v --config .coveralls.yml
- stage: tests allowed to fail
name: "PHP 7.4 / Symfony 5.1"
php: 7.4
env:
- SYMFONY_VERSION="^5.1"
- CAN_FAIL=true
before_install:
- phpenv config-rm xdebug.ini
- echo "memory_limit = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
install:
- make composer-require-symfony-version
- make composer-install
script:
- make phpspec
- php ./vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml
- make behat