forked from kreait/firebase-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
62 lines (54 loc) · 1.44 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
language: php
php:
- "7.0"
- "7.1"
- "7.2"
- "7.3"
stages:
- Tests
- Report
stage: Tests
before_install:
- |
if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then
openssl aes-256-cbc -K $encrypted_d51fa485ef84_key -iv $encrypted_d51fa485ef84_iv -in secrets.tar.enc -out secrets.tar -d;
tar xvf secrets.tar
fi
install:
- composer update --no-interaction --no-suggest --no-progress
script:
- vendor/bin/phpunit --testsuite=unit
jobs:
include:
- stage: Tests
name: "Static Analysis"
php: "7.0"
script:
- vendor/bin/phpstan analyse src tests -c phpstan.neon --level=max --no-progress
- stage: Tests
name: "Integration tests"
php: "7.0"
script:
- vendor/bin/phpunit --testsuite=integration
if: repo = "kreait/firebase-php" AND type != pull_request
- stage: Tests
name: "Code Style checks"
php: "7.3"
script:
- vendor/bin/php-cs-fixer fix --config=.php_cs.dist -v --dry-run --stop-on-violation --using-cache=no
- stage: Report
name: "Code Coverage"
php: "7.0"
git:
depth: false
addons:
sonarcloud:
organization: "kreait"
script:
- vendor/bin/phpunit --coverage-clover=coverage-report.clover --log-junit=test-report.xml
- sonar-scanner
if: repo = "kreait/firebase-php" AND type != pull_request
cache:
directories:
- vendor
- $HOME/.composer/cache