-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
59 lines (47 loc) · 1.87 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
language: php
sudo: false
cache:
directories:
- $HOME/.composer/cache
env:
matrix:
- COMPOSER_EXTRA_ARGS=""
- COMPOSER_EXTRA_ARGS="--prefer-lowest --prefer-stable"
php:
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4
- 8.0
- hhvm
matrix:
allow_failures:
- php: hhvm
env: COMPOSER_EXTRA_ARGS="--prefer-lowest --prefer-stable"
before_install:
- composer self-update
install:
- mkdir -p vendor/bin
- composer update --no-interaction --prefer-source $COMPOSER_EXTRA_ARGS
before_script:
- ./vendor/bin/parallel-lint -e php,phpt --exclude vendor .
- ./vendor/bin/phpstan analyse -l 5 src tests
- if [[ $TRAVIS_PHP_VERSION == '7.0' ]]; then CODE_CHECKER_VERSION="~2.13"; else CODE_CHECKER_VERSION="~3.1"; fi;
- composer create-project nette/code-checker code-checker $CODE_CHECKER_VERSION --no-interaction --prefer-source
- php code-checker/src/code-checker.php -d src
- php code-checker/src/code-checker.php -d tests
- |
printf "eurosms:\n\tid: $EUROSMSID\n\tkey: $EUROSMSKEY\n" > tests/secret.neon
- if [[ $TRAVIS_PHP_VERSION == '8.0' ]] && [[ $COMPOSER_EXTRA_ARGS == '' ]]; then FLAGS="-d zend_extension=xdebug.so --coverage coverage.xml --coverage-src src"; fi;
script:
- vendor/bin/tester tests -s -p php -c tests/php-unix.ini $FLAGS
after_script:
- curl https://github.com/romanmatyus/SMSender | grep -o '<img[ ]*src="[^"]*"' | grep -o '"[^"]*"' | grep -o '[^"]*' | grep https://camo.githubusercontent.com | xargs -L1 curl -X PURGE
- |
if [[ $TRAVIS_PHP_VERSION == '8.0' ]] && [[ $COMPOSER_EXTRA_ARGS == '' ]]; then
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.xml
fi
after_failure:
- for i in $(find tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done