This repository has been archived by the owner on Apr 30, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
58 lines (47 loc) · 1.85 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
sudo: false
language: php
branches:
only:
- master
env:
global:
- CHECK_PHP_SYNTAX="no"
- ENABLE_CODE_COVERAGE="no"
- COMPOSER_FLAGS=""
- SYMFONY_VERSION=""
matrix:
fast_finish: true
include:
# coverage
- php: 7.2
env: ENABLE_CODE_COVERAGE="yes"
# oldest supported versions
- php: 5.6
env: COMPOSER_FLAGS="--prefer-lowest"
# common versions
- php: 7.1
env:
- SYMFONY_VERSION="3.4.*"
- CHECK_CODE_STYLE="yes"
- php: 7.2
env: SYMFONY_VERSION="4.0.*"
# bleeding edge (unreleased dev versions where failures are allowed)
- php: nightly
env: SYMFONY_VERSION="4.1.*"
allow_failures:
- php: nightly
cache:
directories:
- $HOME/.composer/cache
before_install:
- if [[ "$ENABLE_CODE_COVERAGE" != "yes" ]]; then phpenv config-rm xdebug.ini || true; fi;
- if [[ "$SYMFONY_VERSION" != "" ]]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi;
- if [[ "$CHECK_CODE_STYLE" != "yes" ]]; then composer remove "friendsofphp/php-cs-fixer" --no-update --no-interaction --dev; fi;
install:
- composer update --prefer-dist --no-interaction --optimize-autoloader --prefer-stable --no-progress $COMPOSER_FLAGS
- if [[ "$ENABLE_CODE_COVERAGE" == "yes" ]]; then composer require --dev satooshi/php-coveralls; fi;
script:
- if [[ "$ENABLE_CODE_COVERAGE" == "yes" ]]; then vendor/bin/simple-phpunit --coverage-text --coverage-clover build/logs/clover.xml; else vendor/bin/simple-phpunit; fi;
- if [[ "$CHECK_CODE_STYLE" == "yes" ]]; then PHP_CS_FIXER_FUTURE_MODE=1 vendor/bin/php-cs-fixer fix --config=.php_cs --dry-run --no-interaction --diff; fi;
after_success:
- if [[ "$ENABLE_CODE_COVERAGE" == "yes" ]]; then php vendor/bin/coveralls -v; fi;