forked from goetas/twital
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
49 lines (41 loc) · 1.26 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
language: php
git:
depth: 1
cache:
directories:
- $HOME/.composer/cache
env:
- TWIG_VERSION=^1.28
matrix:
include:
- php: 5.3
dist: precise
- php: 5.4
- php: 5.5
- php: 5.6
- php: 7.0
- php: 7.1
- php: 7.2
# Twig 2
- php: 7.0
env: TWIG_VERSION='^2.0'
- php: 7.1
env: TWIG_VERSION='^2.0'
- php: 7.2
env: TWIG_VERSION='^2.0'
# oldest possible deps for twig 1.x
- php: 5.3 # for twig 1.x
dist: precise
env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable' TWIG_VERSION=^1.28
- php: 7.0 # for twig 2.x
env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable' TWIG_VERSION=^2.0
fast_finish: true
before_script:
- composer require twig/twig:${TWIG_VERSION} --no-update
- composer update --prefer-dist ${COMPOSER_FLAGS}
script:
- vendor/bin/phpunit --coverage-clover=coverage.xml
- vendor/bin/php-cs-fixer fix --dry-run --diff
after_script:
- bash -c 'if [ "$TRAVIS_PHP_VERSION" == "5.6" ] ; then wget https://scrutinizer-ci.com/ocular.phar; fi;'
- bash -c 'if [ "$TRAVIS_PHP_VERSION" == "5.6" ] ; then php ocular.phar code-coverage:upload --format=php-clover coverage.xml; fi;'