forked from doctrine/coding-standard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
46 lines (37 loc) · 1017 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
46
dist: trusty
sudo: false
language: php
php:
- 7.1
- 7.2
- 7.3
- nightly
cache:
directories:
- $HOME/.composer/cache
before_install:
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available"
- composer self-update
install: travis_retry composer update --prefer-dist
script:
- vendor/bin/phpcs
- vendor/bin/phpcs $(find tests/input/* | sort) --report=summary --report-file=phpcs.log; diff tests/expected_report.txt phpcs.log
stages:
- Validate against schema
- Test
- Apply fixes
jobs:
allow_failures:
- php: nightly
include:
- stage: Validate against schema
addons:
apt:
packages:
- libxml2-utils
script:
- xmllint --noout --schema vendor/squizlabs/php_codesniffer/phpcs.xsd lib/Doctrine/ruleset.xml
- stage: Apply fixes
before_script:
- cp -R tests/input/ tests/input2/
script: vendor/bin/phpcbf tests/input2; diff tests/input2 tests/fixed