forked from kreait/firebase-php
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
66 lines (54 loc) · 1.81 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
language: php
env:
global:
- UNIT_TESTS=1
- STATIC_ANALYSIS=0
- INTEGRATION_TESTS=0
- CODE_COVERAGE=0
- DEFAULT_COMPOSER_FLAGS='--profile --ansi --prefer-dist --no-interaction --optimize-autoloader --no-suggest --no-progress'
- PHPUNIT_FLAGS='--testsuite unit'
- CC_TEST_REPORTER_ID=6e569def80067b8098353f7391c0c478f024666d7227ce7b89b2a7112805d2bd
matrix:
fast_finish: true
include:
- php: 7.0
- php: 7.1
- php: 7.2
- php: 7.2
env: STATIC_ANALYSIS=1
- php: 7.2
env: PHPUNIT_FLAGS='--testsuite integration'
- php: 7.2
env: CODE_COVERAGE=1
allow_failures:
- php: 7.2
env: CODE_COVERAGE=1
sudo: false
cache:
directories:
- vendor
- $HOME/.composer/cache
before_install:
- if [ "$TRAVIS_SECURE_ENV_VARS" == "true" ]; then
openssl aes-256-cbc -K $encrypted_8bfcfbcad9c4_key -iv $encrypted_8bfcfbcad9c4_iv -in test_credentials.json.enc -out tests/_fixtures/test_credentials.json -d;
fi
install:
- composer $COMPOSER_FLAGS $DEFAULT_COMPOSER_FLAGS update
script:
- |
if [ UNIT_TESTS == 1 ]; then
vendor/bin/phpunit $PHPUNIT_FLAGS
fi
if [ STATIC_ANALYSIS == 1 ]; then
vendor/bin/phpstan analyse src -c phpstan.neon --level=6 --no-progress -vvv
fi
if [ CODE_COVERAGE == 1 ]; 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
vendor/bin/phpunit --coverage-clover clover.xml
./cc-test-reporter after-build -t clover --exit-code $?
fi
notifications:
email:
- secure: "iiseqb4k4ckQkMJnZ6Tq3YP5ilTZE4CkVgarsBpPOn+c820nP9QokGpz82D4CTGy/UB1+DfCiFH9YAFrhLP5/9Go1CHP+wYkuz9W+E8q/rm9/nBO0xutoQhOfV3MxMid69E8i4QjODq3w5mOUrmpj/8gl2FyBU1Ro1xgPSYNEQ4="