forked from alterphp/EasyAdminExtensionBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
75 lines (68 loc) · 2.98 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
language: php
dist: precise
sudo: false
git:
depth: 1
cache:
directories:
- $HOME/.composer/cache
- $HOME/.app/cache
env:
global:
- deps="no"
- SYMFONY_VERSION=""
- CHECK_PHP_SYNTAX="no"
- SYMFONY_DEPRECATIONS_HELPER="weak"
- ENABLE_CODE_COVERAGE="false"
matrix:
fast_finish: true
include:
# bleeding edge (unreleased dev versions where failures are allowed)
- php: nightly
env:
- STABILITY=dev
- SYMFONY_VERSION="4.*"
# stable (most recent stable versions)
- php: 7.2
env:
- SYMFONY_VERSION="4.1.*"
- TWIG_VERSION="^2.4"
# Symfony 4
- php: 7.1
env:
- SYMFONY_VERSION="4.0.*"
- STABILITY=beta
# Deprecations breaks CI (sensio frameworkextrabundle + sf 4.1)
# - SYMFONY_DEPRECATIONS_HELPER="strict"
# Symfony 3 LTS
- php: 7.0
env:
- SYMFONY_VERSION="3.4.*"
- TWIG_VERSION="1.x-dev"
# Only 7.0 php images on Travis have xdebug enabled
- ENABLE_CODE_COVERAGE="true"
allow_failures:
# code coverage is very slow; allow a failure to get the Travis result early
- php: nightly
before_install:
- stty cols 120
- INI_FILE=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- echo memory_limit = -1 >> $INI_FILE
- echo session.gc_probability = 0 >> $INI_FILE
- echo opcache.enable_cli = 1 >> $INI_FILE
- if [[ "$SYMFONY_VERSION" == 3.3.* ]]; then export SYMFONY_DEPRECATIONS_HELPER="strict"; fi;
- if [[ "$ENABLE_CODE_COVERAGE" != "true" && "$TRAVIS_EVENT_TYPE" != "cron" ]]; then rm -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini; fi;
- composer self-update
- if [[ "$SYMFONY_VERSION" != "" ]]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi;
- if [[ "$TWIG_VERSION" != "" ]]; then composer require "twig/twig:${TWIG_VERSION}" --no-update; fi;
- if [[ "$STABILITY" != "" ]]; then composer config minimum-stability $STABILITY; fi
install:
- if [[ "$CHECK_PHP_SYNTAX" == "yes" ]]; then composer require --dev --no-update friendsofphp/php-cs-fixer; fi;
- composer update --prefer-dist --no-interaction --no-suggest --no-progress --ansi $COMPOSER_FLAGS
- if [[ "$ENABLE_CODE_COVERAGE" == "true" ]]; then composer require --dev php-coveralls/php-coveralls; fi
script:
- if [[ $ENABLE_CODE_COVERAGE == "true" ]]; then vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml; else vendor/bin/phpunit; fi
- if [[ "$CHECK_PHP_SYNTAX" == "yes" ]]; then php vendor/bin/php-cs-fixer --no-interaction --dry-run --diff -v fix; fi;
- if [[ "$CHECK_PHP_SYNTAX" == "yes" ]]; then mv ./.php_cs.cache $HOME/.app/cache/.php_cs.cache 2> /dev/null; fi;
after_success:
- if [[ "$ENABLE_CODE_COVERAGE" == "true" ]]; then php vendor/bin/php-coveralls -v --config .coveralls.yml; fi;