-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
64 lines (55 loc) · 1.55 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
language: php
services:
- redis-server
notifications:
email:
on_failure: change
env:
global:
- COMPOSER_UP="composer update --no-progress --no-suggest --ansi --prefer-dist"
- TEST_COMMAND="./vendor/bin/codecept run unit --no-interaction"
- TEST_FLAGS=""
- DEPENDENCIES="cache/predis-adapter"
matrix:
fast_finish: true
include:
- php: 5.4
env: TEST_FLAGS="-g client -g parser -g util" DEPENDENCIES="" prefer="low"
- php: 5.4
env: TEST_FLAGS="-g client -g parser -g util" DEPENDENCIES=""
- php: 5.5
env: TEST_FLAGS="-g client -g parser -g util" DEPENDENCIES=""
- php: 5.6
- php: 7.0
- php: 7.1
- php: 7.2
env: COVERAGE=true TEST_FLAGS="--coverage --coverage-xml"
install:
- |
if [[ $prefer = low ]]; then
$COMPOSER_UP --prefer-lowest --prefer-stable
else
$COMPOSER_UP
fi
- if ! [ -z "$DEPENDENCIES" ]; then composer require ${DEPENDENCIES}; fi;
before_script:
- cp .env.dist .env
- sed -i "8s/.*/WG_API_KEY=$WG_API_KEY/" .env
- |
if [[ $COVERAGE = true ]]; then
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
fi
script:
- composer validate --no-check-lock
- $TEST_COMMAND $TEST_FLAGS
after_script:
- |
if [[ $COVERAGE = true ]]; then
mv tests/_output/coverage.xml clover.xml
./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
fi
cache:
directories:
- $HOME/.composer/cache