-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
30 lines (25 loc) · 998 Bytes
/
.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
language: php
matrix:
include:
- php: 7.1
- php: 7.2
- php: 7.3
- php: 7.4
env: ANALYSIS='true'
install:
- composer install --no-interaction --prefer-dist
- if [[ "$ANALYSIS" == 'true' ]]; then wget https://scrutinizer-ci.com/ocular.phar ; fi
script:
# All PHP versions: run unit tests (functionality)
- if [[ "$ANALYSIS" != 'true' ]]; then vendor/bin/phpunit ; fi
# Only latest PHP version: style/quality checks (code coverage, static analysis)
- if [[ "$ANALYSIS" == 'true' ]]; then vendor/bin/phpunit --coverage-clover build/coverage/clover.xml ; fi
- if [[ "$ANALYSIS" == 'true' ]]; then ./run_ci.sh TRAVIS ; fi
- if [[ "$ANALYSIS" == 'true' ]]; then vendor/bin/phpstan analyse --level 1 src tests ; fi
after_script:
# Push code coverage to scrutinizer
- if [[ "$ANALYSIS" == 'true' ]]; then php ocular.phar code-coverage:upload --format=php-clover build/coverage/clover.xml ; fi
notifications:
email:
on_success: never
on_failure: always