forked from EdgedesignCZ/phpqa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
44 lines (44 loc) · 1.67 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
sudo: required
dist: trusty
language: php
services:
- docker
matrix:
include:
- php: 5.4
- php: 5.5
- php: 5.6
- php: 7.0
- php: 7.1
- php: 7.2
- php: hhvm
dist: trusty
allow_failures:
- php: hhvm
install:
# Disable JIT compilation in hhvm, as the JIT is useless for short live scripts like tests + fix Container
- if [[ $TRAVIS_PHP_VERSION = hhvm* ]]; then echo 'hhvm.jit = 0' >> /etc/hhvm/php.ini && echo 'hhvm.hack_compiler_default=false' >> /etc/hhvm/php.ini; fi
- if [ -n "$GITHUB_OAUTH_TOKEN" ]; then composer config -g github-oauth.github.com ${GITHUB_OAUTH_TOKEN}; fi;
- composer install --no-interaction
# test app with symfony3 components in latest php
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.1" ]]; then composer update && composer remove phpunit/phpunit --dev --no-interaction && composer remove sebastian/phpcpd --no-interaction && composer require sebastian/phpcpd:~3.0 phploc/phploc:~4 phpunit/phpunit:~5.7 symfony/filesystem:~3 symfony/process:~3 symfony/finder:~3 && bin/suggested-tools.sh install; fi
# test installing suggested tools like docker image
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" ]]; then bin/suggested-tools.sh install --prefer-dist; fi
# For HHVM phpmetrics report isn't generated, use phpmetrics v2
- if [[ $TRAVIS_PHP_VERSION = hhvm* ]] ; then composer update phpmetrics/phpmetrics; fi
script:
- vendor/phpunit/phpunit/phpunit
- ./phpqa tools
- bin/ci.sh
deploy:
- provider: script
script: .docker/build-image
skip_cleanup: true
on:
tags: true
php: 7.0
# http://blog.wyrihaximus.net/2015/07/composer-cache-on-travis/
cache:
directories:
- vendor
- $HOME/.composer/cache