1language: php
2
3sudo: false
4
5addons:
6  apt:
7    packages:
8      - libxml2-utils
9
10php:
11  - 5.6
12  - 7.0
13  - 7.1
14  - 7.2
15  - master
16
17matrix:
18  allow_failures:
19    - php: 7.2
20    - php: master
21  fast_finish: true
22
23env:
24  matrix:
25    - DEPENDENCIES="high"
26    - DEPENDENCIES="low"
27  global:
28    - DEFAULT_COMPOSER_FLAGS="--no-interaction --no-ansi --no-progress --no-suggest"
29
30before_install:
31  - composer self-update
32  - composer clear-cache
33
34install:
35  - if [[ "$DEPENDENCIES" = 'high' ]]; then travis_retry composer update $DEFAULT_COMPOSER_FLAGS; fi
36  - if [[ "$DEPENDENCIES" = 'low' ]]; then travis_retry composer update $DEFAULT_COMPOSER_FLAGS --prefer-lowest; fi
37
38before_script:
39  - echo 'zend.assertions=1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
40  - echo 'assert.exception=On' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
41
42script:
43  - ./phpunit --coverage-clover=coverage.xml
44  - ./phpunit --configuration ./build/travis-ci-fail.xml > /dev/null; if [ $? -eq 0 ]; then echo "SHOULD FAIL"; false; else echo "fail checked"; fi;
45  - xmllint --noout --schema phpunit.xsd phpunit.xml
46  - xmllint --noout --schema phpunit.xsd tests/_files/configuration.xml
47  - xmllint --noout --schema phpunit.xsd tests/_files/configuration_empty.xml
48  - xmllint --noout --schema phpunit.xsd tests/_files/configuration_xinclude.xml -xinclude
49
50after_success:
51  - bash <(curl -s https://codecov.io/bash)
52
53notifications:
54  email: false
55
56