-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
57 lines (46 loc) · 2.12 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
53
54
55
56
57
language: php
matrix:
# Test only on versions of Sf that are still supported. See: http://symfony.com/doc/current/contributing/community/releases.html#version-history
include:
- php: 5.6
env: SYMFONY_VERSION=2.7.* CODE_COVERAGE=0
- php: 7.0
env: SYMFONY_VERSION=2.8.* CODE_COVERAGE=1
- php: 7.1
env: SYMFONY_VERSION=3.4.* CODE_COVERAGE=0
- php: 7.2
env: SYMFONY_VERSION=4.2.* CODE_COVERAGE=0
- php: 7.3
env: SYMFONY_VERSION=4.3.* CODE_COVERAGE=0
#before_install:
# This is mandatory or 'apt-get install' calls following will fail
#- sudo apt-get update -qq
install:
- phpenv config-add Tests/travis/zzz_php.ini
# Disable xdebug for speed (executing composer), but allow us to re-enable it later
- export XDEBUG_INI=`php -i | grep xdebug.ini | grep home/travis | grep -v '=>' | head -1`
- export XDEBUG_INI=${XDEBUG_INI/,/}
- if [ "$XDEBUG_INI" != "" ]; then mv "$XDEBUG_INI" "$XDEBUG_INI.bak"; fi
- composer require --prefer-source --dev symfony/symfony:${SYMFONY_VERSION}
- composer install
# Re-enable xdebug for when we need to generate code coverage
- if [ "$CODE_COVERAGE" = "1" -a "$XDEBUG_INI" != "" ]; then mv "$XDEBUG_INI.bak" "$XDEBUG_INI"; fi
before_script:
- cp phpunit.xml.dist phpunit.xml
script:
- if [ "$CODE_COVERAGE" = "1" ]; then ./vendor/phpunit/phpunit/phpunit --colors --coverage-clover=coverage.clover Tests/phpunit; else ./vendor/phpunit/phpunit/phpunit --colors Tests/phpunit; fi
after_failure:
# Display as much info as we can to help developers
#- cat apache_error.log
#- cat apache_access.log
- php -i
after_script:
# Upload code-coverage to Scrutinizer
- if [ "$CODE_COVERAGE" = "1" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [ "$CODE_COVERAGE" = "1" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
# Upload code-coverage to CodeClimate
#- if [ "$CODE_COVERAGE" = "1" ]; then CODECLIMATE_REPO_TOKEN=TOBEGOTTEN ./vendor/bin/test-reporter --coverage-report=coverage.clover; fi
# Try to avoid problems with shared composer caches...
#cache:
# directories:
# - $COMPOSER_CACHE_DIR