forked from EasyCorp/EasyAdminBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
65 lines (57 loc) · 2.33 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
language: php
sudo: false
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:
# jobs are ordered in a specific way to get Travis results faster (first
# execute the fastest jobs, then the slowest and finally the jobs that can fail)
- php: 7.0
env: CHECK_PHP_SYNTAX="yes"
env: SYMFONY_VERSION="3.0.*"
- php: 5.6
env: SYMFONY_VERSION="2.3.*"
- php: 5.6
env: SYMFONY_VERSION="2.7.*"
- php: 5.6
env: SYMFONY_VERSION="2.8.*"
- php: 5.3
env: COMPOSER_FLAGS="--prefer-lowest"
env: SYMFONY_VERSION="2.8.*"
- php: hhvm
env: SYMFONY_VERSION="2.8.*"
- php: 7.0
env: SYMFONY_VERSION="3.0.*"
env: ENABLE_CODE_COVERAGE="true"
- php: 5.6
env: TWIG_VERSION="2.0.x-dev"
allow_failures:
- php: hhvm
- env: TWIG_VERSION="2.0.x-dev"
- env: ENABLE_CODE_COVERAGE="true"
before_install:
- if [[ "SYMFONY_VERSION" == "2.8.*" || "SYMFONY_VERSION" == "3.0.*" ]]; then export SYMFONY_DEPRECATIONS_HELPER="strict"; fi;
- composer selfupdate
- 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 [[ "$ENABLE_CODE_COVERAGE" != "true" && "$TRAVIS_PHP_VERSION" != hhvm ]]; then phpenv config-rm xdebug.ini; fi;
install:
- if [[ "$CHECK_PHP_SYNTAX" == "yes" ]]; then curl http://get.sensiolabs.org/php-cs-fixer.phar -o php-cs-fixer; fi;
- composer update --prefer-dist --no-interaction $COMPOSER_FLAGS
- if [[ "$ENABLE_CODE_COVERAGE" == "true" ]]; then composer require --dev satooshi/php-coveralls; fi
script:
- if [[ "$ENABLE_CODE_COVERAGE" == "true" ]]; then phpunit --coverage-text --coverage-clover build/logs/clover.xml; else phpunit; fi;
- if [[ "$CHECK_PHP_SYNTAX" == "yes" ]]; then php 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; fi;
after_success: |
if [[ "$ENABLE_CODE_COVERAGE" == "true" ]]; then php vendor/bin/coveralls -v --config .coveralls.yml; fi;