This repository has been archived by the owner on Jun 9, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
.travis.yml
78 lines (68 loc) · 3.04 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
env:
global:
- DEFAULT_COMPOSER_FLAGS="--prefer-dist --no-interaction --no-progress --optimize-autoloader"
- TASK_STATIC_ANALYSIS=0
- TASK_TESTS_COVERAGE=0
matrix:
include:
- php: "7.4"
env:
- TASK_STATIC_ANALYSIS=0 # set to 1 to enable static analysis
- TASK_TESTS_COVERAGE=1
# faster builds on new travis setup not using sudo
sudo: false
# cache vendor dirs
cache:
directories:
- $HOME/.composer/cache
before_install:
- phpenv config-rm xdebug.ini || echo "xdebug is not installed"
install:
- travis_retry composer self-update && composer --version
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- travis_retry composer install $DEFAULT_COMPOSER_FLAGS
- |
if [ $TASK_STATIC_ANALYSIS == 1 ]; then
pecl install ast
fi
before_script:
- php --version
- composer --version
# enable code coverage
- |
if [ $TASK_TESTS_COVERAGE == 1 ]; then
PHPUNIT_COVERAGE_FLAG="--coverage-clover=coverage.clover"
fi
script:
- phpdbg -qrr vendor/bin/phpunit --verbose $PHPUNIT_COVERAGE_FLAG
- |
if [ $TASK_STATIC_ANALYSIS == 1 ]; then
composer phan
fi
- |
if [ $TASK_STATIC_ANALYSIS == 1 ]; then
cat analysis.txt
fi
after_script:
- |
if [ $TASK_TESTS_COVERAGE == 1 ]; then
travis_retry wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
fi
notifications:
slack:
-
rooms:
-
secure: Ptr3UNVbRfTkcrMaO+YgVCFEcGzc+7i108Nr7ASCynCqWc3WS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nQAQ0PfcNFVe9BugQYh43L5XPOXhfXppAJxutSdZxEjQogZ4DVzlRMHZBYbmtgjTLftx7jXOGYK6BJd85EMR4JBg1XRLkhDjXzwrS8EHSBUp4v+byNmaWwjb/Ar1R9UeWOqZ2ERkQirq40HymRcvohmLw4mgJydoPbge/EiGklTit46HGuHDlsJxxG+mIs7ld5HrM2KELBmhkCAnfDleohCpLoZ0qwLMDVdL7rsp1GHULSS9sU0wbNrWO2ohBpATtjzNsFTktDMowFC/ZvJA4SQGh3kO5WlPqVok=
on_success: never
on_failure: always
on_pull_requests: false