-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.travis.yml
47 lines (39 loc) · 1.07 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
cache:
apt: true
language: php
notifications:
email:
on_success: never
on_failure: change
php:
- 7.1
- 7.2
- nightly
matrix:
fast_finish: true
include:
# Run PHP CodeSniffer and XMLLint against just PHP 7.1 job.
- php: 7.1
env: SNIFF=1 LINT=1
addons:
apt:
packages:
- libxml2-utils
allow_failures:
# Allow failures for unstable builds.
- php: nightly
before_install:
- export XMLLINT_INDENT=" "
install:
- composer install
script:
# Lint the PHP files against parse errors.
- if [[ "$LINT" == "1" ]]; then if find src tests -name "*.php" -exec php -l {} \; | grep "^[Parse error|Fatal error]"; then exit 1; fi; fi
# Validate the xml files.
# @link http://xmlsoft.org/xmllint.html
- if [[ "$LINT" == "1" ]]; then xmllint --noout ./phpcs.xml.dist; fi
- if [[ "$LINT" == "1" ]]; then xmllint --noout --schema ./vendor/phpunit/phpunit/phpunit.xsd ./phpunit.xml.dist; fi
# Check coding standards.
- if [[ "$SNIFF" == "1" ]]; then ./vendor/bin/phpcs; fi
# Run tests.
- ./vendor/bin/phpunit