forked from Kdyby/StrictObjects
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
78 lines (62 loc) · 1.76 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
69
70
71
72
73
74
75
76
77
78
language: php
sudo: false
dist: trusty
cache:
directories:
- $HOME/.composer/cache
php:
- 7.2
- nightly
before_install:
- |
if [ "x$COVERAGE" != "xyes" ]; then
mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || true
fi
before_script:
- |
if [ "x$COVERAGE" == "xyes" ] && [[ ! $(php -m | grep -si xdebug) ]]; then
echo "xdebug is required for coverage"
exit 1
fi
install: travis_retry composer -n update --prefer-dist
script:
- |
if [ "x$COVERAGE" == "xyes" ]; then
vendor/bin/phpunit --coverage-text --coverage-clover coverage.xml tests/
else
vendor/bin/phpunit tests/
fi
after_script:
- |
if [ "x$COVERAGE" == "xyes" ]; then
travis_retry wget -O /tmp/coveralls.phar https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar
php /tmp/coveralls.phar --verbose --config tests/.coveralls.yml || true
fi
jobs:
allow_failures:
- php: nightly
- env: DEPENDENCIES=dev
exclude:
- php: 7.2
include:
- stage: Test
env: COVERAGE=yes
- stage: Test
env: DEPENDENCIES=lowest
install: travis_retry composer update -n --prefer-lowest --prefer-dist
- stage: Test
env: DEPENDENCIES=dev
install:
- composer config minimum-stability dev
- travis_retry composer update -n --prefer-dist
- stage: Code Quality
env: LINT
script: vendor/bin/parallel-lint -e php,phpt src/ tests/
- stage: Code Quality
env: CODING_STANDARD
script: vendor/bin/phpcs
- stage: Code Quality
env: STATIC_ANALYSIS
script: vendor/bin/phpstan analyse
after_failure:
- 'for i in $(find ./tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done'