forked from craue/CraueConfigBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
65 lines (57 loc) · 1.84 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
58
59
60
61
62
63
64
65
language: php
php:
- 7.0
- 7.1
- 7.2
- 7.3
env:
- SYMFONY_VERSION='3.4.*'
matrix:
include:
- php: 7.0
env: DEPS='lowest' SYMFONY_DEPRECATIONS_HELPER='832'
- php: 7.3
env: DEPS='unmodified'
- php: 7.3
env: SYMFONY_VERSION='4.1.*'
- php: 7.3
env: SYMFONY_VERSION='4.2.*'
- php: 7.3
env: SYMFONY_VERSION='4.3.*' MIN_STABILITY='dev'
allow_failures:
- env: SYMFONY_VERSION='4.3.*' MIN_STABILITY='dev'
fast_finish: true
install:
# set unlimited memory_limit
- INI_FILE=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- echo "memory_limit = -1" >> "${INI_FILE}"
# disable Xdebug for better Composer performance
- if php -v | grep -q 'Xdebug'; then phpenv config-rm xdebug.ini; fi;
# install dependencies using Composer
- bash .travis_install_dependencies.sh
# show installed dependencies
- composer show
before_script:
# set up MySQL
- mysql -u root -e 'CREATE DATABASE IF NOT EXISTS test;'
- mysql -u root -e 'GRANT USAGE ON *.* TO "travis"@"localhost"; DROP USER "travis"@"localhost";'
- mysql -u root -e 'CREATE USER "travis"@"localhost" IDENTIFIED BY PASSWORD "";'
- mysql -u root -e 'GRANT ALL ON test.* TO "travis"@"localhost"; FLUSH PRIVILEGES;'
# create folder for code coverage data
- mkdir -p build/logs
script:
# validate composer.json
- composer validate --strict --no-check-lock
# run PHPUnit
- phpdbg -qrr vendor/phpunit/phpunit/phpunit -v --coverage-clover build/logs/clover.xml
# upload code coverage data
- travis_retry wget -q https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar && travis_retry php php-coveralls.phar -v
notifications:
email:
on_success: always
on_failure: always
# cache Composer's package cache
cache:
directories:
- $HOME/.composer/cache/files
- vendor