forked from LM-Commons/LmcRbac
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
58 lines (51 loc) · 1.65 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
language: php
cache:
directories:
- $HOME/.composer/cache
- $HOME/.php-cs-fixer
env:
global:
- COMPOSER_ARGS="--no-interaction"
- XDEBUG_MODE=coverage
matrix:
include:
- php: 7.3
env:
- DEPENDENCIES=""
- php: 7.3
env:
- DEPENDENCIES="--prefer-lowest --prefer-stable"
- php: 7.4
env:
- DEPENDENCIES=""
- EXECUTE_CS_CHECK=true
- TEST_COVERAGE=true
- php: 7.4
env:
- DEPENDENCIES="--prefer-lowest --prefer-stable"
- php: 8.0
env:
- DEPENDENCIES="--prefer-lowest --prefer-stable"
- php: 8.0
env:
- DEPENDENCIES=""
before_install:
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0; fi
before_script:
- mkdir -p ./build/logs
- mkdir -p "$HOME/.php-cs-fixer"
- composer self-update
- composer update $COMPOSER_ARGS $DEPENDENCIES
script:
- if [[ $TEST_COVERAGE == 'true' ]]; then ./vendor/bin/phpunit --coverage-text --coverage-clover ./build/logs/clover.xml; else ./vendor/bin/phpunit; fi
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/php-cs-fixer fix -v --diff --dry-run; fi
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/docheader check src/ tests/; fi
after_success:
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry php vendor/bin/php-coveralls -v; fi
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/90753b5c820315c57410
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always