/
.travis.yml
48 lines (41 loc) · 1.46 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
language: php
cache:
directories:
- $HOME/.composer/cache/files
services:
- mysql
php:
- 7.1
- 7.2
- 7.3
env:
- SYMFONY_VERSION="3.4.*"
- SYMFONY_VERSION="4.3.*"
- PHPUNIT_VERSION="6.*"
- PHPUNIT_VERSION="7.*"
matrix:
include:
- php: 7.3
env:
- TEST_COVERAGE=true
- php: 7.3
env:
- PHPUNIT_VERSION="8.*"
- SYMFONY_VERSION="4.3.*"
install:
- rm -rf composer.lock vendor/*
- phpenv config-rm xdebug.ini || echo "xDebug not disabled"
- export COMPOSER_MEMORY_LIMIT=-1 && composer require symfony/symfony:${SYMFONY_VERSION:-"3.3.*"} phpunit/phpunit:${PHPUNIT_VERSION:-"7.*"}
script:
- cp tests/Functional/parameters.yml.dist tests/Functional/parameters.yml
- rm -rf tests/Functional/cache
- make phpstan php_cs_fixer_check
- |
if [[ ${PHPUNIT_VERSION} != "8.*" && ${TEST_COVERAGE} ]]; then phpdbg -qrr vendor/bin/phpunit -c tests/ --coverage-clover ./build/logs/clover.xml;
elif [[ ${PHPUNIT_VERSION} == "8.*" && ${TEST_COVERAGE} ]]; then phpdbg -qrr vendor/bin/phpunit -c tests/phpunit8.xml --coverage-clover ./build/logs/clover.xml;
elif [[ ${PHPUNIT_VERSION} == "8.*" ]]; then vendor/bin/phpunit -c tests/phpunit8.xml tests/;
else vendor/bin/phpunit -c tests/ tests/;
fi
after_success:
- if [[ ${TEST_COVERAGE} ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [[ ${TEST_COVERAGE} ]]; then php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml; fi