-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
52 lines (44 loc) · 1.5 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
48
49
50
51
52
language: php
env:
global:
- PHPUNIT_FLAGS='--no-coverage'
- TEST_COVERAGE=0
# https://phpunit.de/supported-versions.html
matrix:
include:
- php: 7.1
env: PHPUNIT_VERSION=7.5.*
- php: 7.2
env: PHPUNIT_VERSION=7.5.*
- php: 7.3
env: PHPUNIT_VERSION=7.5.*
- php: 7.4
env: PHPUNIT_VERSION=7.5.* TEST_COVERAGE=1 PHPUNIT_FLAGS='--coverage-clover clover.xml'
- php: nightly
env: PHPUNIT_VERSION=7.5.*
fast_finish: true
allow_failures:
- php: nightly
cache:
apt: true
directories:
# Cache directory for older Composer versions.
- $HOME/.composer/cache/files
# Cache directory for more recent Composer versions.
- $HOME/.cache/composer/files
install:
# Speed up build time by disabling Xdebug unless actually needed.
- if [ "$TEST_COVERAGE" != '1' ]; then phpenv config-rm xdebug.ini || echo 'No xdebug config.'; fi
- composer global require hirak/prestissimo --no-suggest --no-interaction
# Update composer.json to overwrite phpunit with specific version
- composer require "phpunit/phpunit:${PHPUNIT_VERSION}" --dev --no-update --no-interaction --no-suggest
- composer install --no-suggest --no-interaction --ignore-platform-reqs
script: ./vendor/bin/phpunit --configuration ./phpunit.xml.dist $PHPUNIT_FLAGS
after_script:
- |
if [ "$TEST_COVERAGE" == '1' ]; then
travis_retry wget https://scrutinizer-ci.com/ocular.phar;
travis_retry php ocular.phar code-coverage:upload --format=php-clover clover.xml;
fi
notifications:
email: false