-
Notifications
You must be signed in to change notification settings - Fork 24
/
.travis.yml
47 lines (39 loc) · 1.3 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
language: php
sudo: false
cache:
directories:
- $HOME/.composer/cache
matrix:
include:
- php: 7.1
env: deps=low coverage=true
- php: 7.2
env: check_cs=true
- php: 7.3
- php: 7.4
dist: bionic
env:
global:
- deps=high
- coverage=false
- check_cs=false
before_install:
- source .travis/xdebug.sh
- xdebug-disable
install:
- if [ "$deps" = "low" ]; then composer --prefer-source --prefer-lowest update; fi;
- if [ "$deps" != "low" ]; then composer --prefer-source update; fi;
script:
- if [ "$coverage" = "true" ]; then xdebug-enable; fi;
- if [ "$coverage" = "true" ]; then vendor/bin/phpunit --coverage-clover=coverage; fi;
- if [ "$coverage" = "true" ]; then xdebug-disable; fi;
- if [ "$coverage" != "true" ]; then vendor/bin/phpunit; fi;
- |
if [ "$check_cs" = "true" ]; then
wget https://cs.symfony.com/download/php-cs-fixer-v2.phar -O php-cs-fixer
chmod +x php-cs-fixer
./php-cs-fixer fix --config=.php_cs.dist --dry-run --diff
fi;
after_script:
- if [ "$coverage" = "true" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi;
- if [ "$coverage" = "true" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage; fi;