-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
68 lines (58 loc) · 1.98 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
66
67
68
language: php
sudo: false
cache:
directories:
- ~/.npm
- ~/.composer/cache
- node_modules
- vendor
matrix:
fast_finish: true
include:
# Use the newer stack for HHVM as HHVM does not support Precise anymore since a long time and so Precise has an outdated version
- php: hhvm-stable
sudo: required
dist: trusty
group: edge
addons:
apt:
packages:
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
- php: 5.5
env: setup=resource
- php: 5.5
env: setup=coverage
- php: 5.6
- php: 7.0
- php: 7.1
allow_failures:
- php: 7.1
- php: hhvm-stable
mysql:
database: $DB_NAME
username: $DB_USER
encoding: utf8
before_install:
- PHP=$TRAVIS_PHP_VERSION
- if [[ $setup = resource ]]; then source ~/.nvm/nvm.sh && nvm install 6; fi
- if [[ ! $PHP = hhvm* ]]; then ini_file=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; else ini_file=/etc/hhvm/php.ini; fi
- if [[ ! $setup = resource ]]; then mysql -u $DB_USER -e "create database if not exists ${DB_NAME}"; fi
install:
- if [[ ! $setup ]]; then composer install -n -q; fi
- if [[ $setup = coverage ]]; then composer require codeclimate/php-test-reporter:~0.3 -n -q; fi
- if [[ $setup = resource ]]; then npm -g update -s && npm i -s; fi
- if [[ ! $setup = resource ]]; then php app/console migrate; fi
script:
- if [[ ! $setup ]]; then composer test -q; fi
- if [[ $setup = coverage ]]; then ./vendor/bin/phpunit -c tests/phpunit.xml --coverage-clover build/logs/clover.xml; fi
- if [[ $setup = resource ]]; then gulp build; fi
after_success:
- export CI_BUILD_NUMBER="$TRAVIS_BUILD_NUMBER"; export CI_PULL_REQUEST="$TRAVIS_PULL_REQUEST"; export CI_BRANCH="$TRAVIS_BRANCH"
- if [[ $setup = coverage ]]; then ./vendor/bin/test-reporter && ./vendor/bin/coveralls -v; fi
branches:
except:
- /^v\d\..*/ # Exclude tags with 'v' as prefix
notifications:
email: false