forked from baldurrensch/AliceBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
75 lines (63 loc) · 1.94 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
66
67
68
69
70
71
72
73
74
75
language: php
php:
- '7.2'
- nightly
branches:
only:
- master
env:
global:
- OCULAR_BIN=$HOME/.bin/ocular.phar
- PHPUNIT_BIN='vendor/bin/phpunit'
- PHPUNIT_CONFIG='phpunit.xml.dist'
- PHPUNIT_FLAGS='--stop-on-failure --verbose'
cache:
directories:
- $HOME/.composer/cache/files
- $HOME/.bin/
services:
- mysql
matrix:
fast_finish: true
include:
- php: '7.2'
env:
- COMPOSER_FLAGS="--prefer-lowest"
- SYMFONY_DEPRECATIONS_HELPER="weak_vendors"
- php: '7.2'
env: SYMFONY_REQUIRE="~3.4.0"
- php: '7.2'
env:
- COVERAGE="true"
- PHPUNIT_FLAGS="--stop-on-failure --verbose --coverage-text --coverage-clover=coverage.xml"
- LINT="1"
allow_failures:
- php: nightly
before_install:
- set -eo pipefail
- echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- phpenv config-rm xdebug.ini || true
- if [ "$SYMFONY_REQUIRE" != "" ]; then composer global require --no-scripts symfony/flex; fi
- |
if [ -n "$COVERAGE" ]; then
pecl install pcov;
PHPUNIT_FLAGS="$PHPUNIT_FLAGS --testdox --coverage-text"
if [ ! -e $OCULAR_BIN ]; then
wget https://scrutinizer-ci.com/ocular.phar -O $OCULAR_BIN
chmod +x $OCULAR_BIN
alias ocular="php $OCULAR_BIN"
fi
else
PHPUNIT_BIN="php -d zend.enable_gc=0 $PHPUNIT_BIN"
fi
- mysql -u root -e 'create database hautelook_alice_bundle;'
- if [[ $LINT = "1" ]]; then wget https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.12.1/php-cs-fixer.phar; fi
install:
- composer update --prefer-dist $COMPOSER_FLAGS
script:
- $PHPUNIT_BIN -c $PHPUNIT_CONFIG $PHPUNIT_FLAGS
- if [[ $LINT = "1" ]]; then php php-cs-fixer.phar fix --dry-run --diff --no-ansi; fi
after_script:
- if [ -n "$COVERAGE" ]; then $OCULAR_BIN code-coverage:upload --format=php-clover coverage.xml; fi
notifications:
email: false