forked from Kdyby/Console
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
63 lines (53 loc) · 2.52 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
language: php
sudo: false
cache:
directories:
- $HOME/.composer/cache
- $HOME/phpcs-cache
php:
- 7.1
- 7.2
- 7.3
env:
matrix:
- RUN_TESTS=1 SYMFONY=4.* # dev
- RUN_TESTS=1 SYMFONY=3.* # dev
- RUN_TESTS=1 SYMFONY=2.* # dev
- RUN_TESTS=1 SYMFONY=4.* COMPOSER_EXTRA_ARGS="--prefer-stable"
- RUN_TESTS=1 SYMFONY=3.* COMPOSER_EXTRA_ARGS="--prefer-stable"
- RUN_TESTS=1 SYMFONY=2.* COMPOSER_EXTRA_ARGS="--prefer-stable"
- RUN_TESTS=1 SYMFONY=4.* COMPOSER_EXTRA_ARGS="--prefer-lowest --prefer-stable"
- RUN_TESTS=1 SYMFONY=3.* COMPOSER_EXTRA_ARGS="--prefer-lowest --prefer-stable"
- RUN_TESTS=1 SYMFONY=2.* COMPOSER_EXTRA_ARGS="--prefer-lowest --prefer-stable"
matrix:
fast_finish: true
include:
- php: 7.3
env: SYMFONY=4.* COMPOSER_EXTRA_ARGS="--prefer-stable" COVERAGE="--coverage ./coverage.xml --coverage-src ./src" TESTER_RUNTIME="phpdbg"
- php: 7.3
env: RUN_TESTS=0 SYMFONY=4.* COMPOSER_EXTRA_ARGS="--prefer-stable" PHPSTAN=1
- php: 7.3
env: RUN_TESTS=0 SYMFONY=4.* COMPOSER_EXTRA_ARGS="--prefer-stable" CODING_STANDARD=1
exclude:
- php: 7.3
env: SYMFONY=4.* COMPOSER_EXTRA_ARGS="--prefer-stable"
allow_failures:
- env: RUN_TESTS=1 SYMFONY=4.*
- env: RUN_TESTS=1 SYMFONY=3.*
- env: RUN_TESTS=1 SYMFONY=2.*
before_install:
- if [[ $SYMFONY = '2.*' ]]; then composer require --no-update symfony/console:^2.8; fi
- if [[ $SYMFONY = '3.*' ]]; then composer require --no-update symfony/console:^3.0; fi
- if [[ $SYMFONY = '4.*' ]]; then composer require --no-update symfony/console:^4.0; fi
- travis_retry composer self-update
install:
- travis_retry composer update --no-interaction --no-suggest --no-progress --prefer-dist $COMPOSER_EXTRA_ARGS # update because we may need --prefer-lowest option
script:
- if [ "$PHPSTAN" = "1" ]; then vendor/bin/phpstan analyse -l 2 -c phpstan.neon src tests/KdybyTests; fi
- if [ "$CODING_STANDARD" = "1" ]; then vendor/bin/phpcs --standard=ruleset.xml --cache=$HOME/phpcs-cache/.phpcs-cache --encoding=utf-8 -sp src tests/KdybyTests; fi
- if [ "$CODING_STANDARD" = "1" ]; then vendor/bin/parallel-lint -e php,phpt --exclude vendor .; fi
- if [ "$RUN_TESTS" = "1" ]; then vendor/bin/tester $COVERAGE -s -p ${TESTER_RUNTIME:-php} -c ./tests/php.ini-unix ./tests/KdybyTests/; fi
after_script:
- if [ "$COVERAGE" != "" ]; then vendor/bin/php-coveralls --verbose --config tests/.coveralls.yml || true; fi
after_failure:
- 'for i in $(find ./tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done'