This repository has been archived by the owner on Jul 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
55 lines (45 loc) · 1.94 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
language: php
dist: trusty
php:
- 5.6
- 7.0
- 7.1
- 7.2
- hhvm
env:
global:
- COVERALLS_EXECUTION_PHP_VERSION="7.2"
- PHP_CS_FIXER_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE}"
- PHP_CS_FIXER_EXECUTION_PHP_VERSION="7.2"
matrix:
fast_finish: true
include:
# Test against Symfony LTS versions
- php: 5.6
env: SYMFONY_VERSION="2.7.*"
- php: 5.6
env: SYMFONY_VERSION="2.8.*"
- php: 5.6
env: SYMFONY_VERSION="3.4.*"
# Test against dev versions
- php: 5.6
env: DEPENDENCIES=dev
allow_failures:
- php: hhvm
sudo: false
cache:
directories:
- $HOME/.composer/cache
before_install:
- composer self-update
- if [[ $(phpenv version-name) == "$COVERALLS_EXECUTION_PHP_VERSION" ]]; then composer require "satooshi/php-coveralls:^1.0" --no-update -n; fi
- if [ "$SYMFONY_VERSION" != "" ]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi;
install: composer update --prefer-dist --no-interaction $COMPOSER_FLAGS
script:
- if [[ $(phpenv version-name) == "$COVERALLS_EXECUTION_PHP_VERSION" ]]; then mkdir -p build/logs/; fi
- if [[ $(phpenv version-name) == "$COVERALLS_EXECUTION_PHP_VERSION" ]]; then ./vendor/bin/phpunit -v --coverage-text --coverage-clover build/logs/clover.xml; fi
- if [[ $(phpenv version-name) != "$COVERALLS_EXECUTION_PHP_VERSION" ]]; then ./vendor/bin/phpunit -v --coverage-text; fi
- if [[ $(phpenv version-name) == "$PHP_CS_FIXER_EXECUTION_PHP_VERSION" ]]; then IFS=$'\n'; COMMIT_SCA_FILES=($(git diff --name-only --diff-filter=ACMRTUXB "${PHP_CS_FIXER_COMMIT_RANGE}")); unset IFS; fi
- if [[ $(phpenv version-name) == "$PHP_CS_FIXER_EXECUTION_PHP_VERSION" ]]; then ./vendor/bin/php-cs-fixer fix --config=.php_cs.dist -v --dry-run --stop-on-violation --using-cache=no --path-mode=intersection -- "${COMMIT_SCA_FILES[@]}"; fi
after_script:
- if [[ $(phpenv version-name) == "$COVERALLS_EXECUTION_PHP_VERSION" ]]; then ./vendor/bin/coveralls -v; fi