forked from sabre-io/Baikal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
45 lines (37 loc) · 953 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
language: php
dist: trusty
php:
- 7.1
- 7.2
- 7.3
- 7.4
env:
global:
- RUN_PHPSTAN="FALSE"
matrix:
- PREFER_LOWEST=""
- PREFER_LOWEST="--prefer-lowest"
install:
- if [ $RUN_PHPSTAN == "TRUE" ]; then composer require --dev phpstan/phpstan:^0.12; fi
matrix:
include:
- name: 'PHPStan'
php: 7.4
env:
- RUN_PHPSTAN="TRUE"
fast_finish: true
services:
- mysql
sudo: false
before_script:
# - mysql -e 'create database sabredav'
- rm -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
# - composer self-update
- composer update $PREFER_LOWEST
script:
- if [ $RUN_PHPSTAN == "FALSE" ]; then find Core -name "*.php" | xargs -n1 php -l; fi
- if [ $RUN_PHPSTAN == "FALSE" ]; then php vendor/bin/php-cs-fixer fix --dry-run --diff; fi
- if [ $RUN_PHPSTAN == "TRUE" ]; then php vendor/bin/phpstan.phar analyse Core html; fi
cache:
directories:
- $HOME/.composer/cache