-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
46 lines (37 loc) · 1.16 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
language: php
matrix:
include:
- php: 7.2
dist: bionic
- php: 7.3
dist: bionic
- php: 7.4
dist: bionic
- php: nightly
dist: bionic
env: COMPOSER_OPTS="--ignore-platform-req=php"
cache:
directories:
- $HOME/.composer/cache
install:
- travis_retry composer install $COMPOSER_OPTS
# Where PHPUnit v8 is used, we need to replace the config.
- if [[ ${TRAVIS_PHP_VERSION:0:1} == "7" ]]
&& [ ${TRAVIS_PHP_VERSION:2:1} -lt 4 ]; then
cp -v tests/phpunit.legacy.xml tests/phpunit.xml
; fi
# PHPUnit 9 supports 7.3, but Infection PHP 18 can't read
# its config so instead we downgrade to PHPUnit 8.5 here.
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.3" ]]; then
travis_retry composer require -W phpunit/phpunit:^8.5
; fi
script:
- vendor/bin/grumphp run
- composer test
- if [[ ${TRAVIS_PHP_VERSION:0:1} == "7" ]]; then composer infection; else
vendor/bin/infection --ansi --threads=4
--initial-tests-php-options="-d xdebug.mode=coverage"
--only-covered --min-msi=100 --min-covered-msi=100
; fi
- composer psalm
after_success: bash <(curl -s https://codecov.io/bash)