forked from EC-CUBE/ec-cube
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
79 lines (68 loc) · 2.75 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
76
77
78
79
# for travis-ci
# see also. https://travis-ci.org
git:
submodules: false
language: php
cache:
directories:
- vendor
- $HOME/.composer/cache
php:
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
dist: precise
matrix:
fast_finish: true
include:
- php: 7.0.12 # for coverrage
env: DB=pgsql USER=postgres DBNAME=myapp_test DBPASS=password DBUSER=postgres PHP_SAPI=phpdbg
sudo: required
dist: trusty
exclude:
- php: 5.3
env: DB=pgsql USER=postgres DBNAME=myapp_test DBPASS=password DBUSER=postgres PHP_SAPI=phpdbg
- php: 5.4
env: DB=pgsql USER=postgres DBNAME=myapp_test DBPASS=password DBUSER=postgres PHP_SAPI=phpdbg
- php: 5.5
env: DB=pgsql USER=postgres DBNAME=myapp_test DBPASS=password DBUSER=postgres PHP_SAPI=phpdbg
- php: 5.6
env: DB=pgsql USER=postgres DBNAME=myapp_test DBPASS=password DBUSER=postgres PHP_SAPI=phpdbg
- php: 7.0
env: DB=pgsql USER=postgres DBNAME=myapp_test DBPASS=password DBUSER=postgres PHP_SAPI=phpdbg
- php: 7.1
env: DB=pgsql USER=postgres DBNAME=myapp_test DBPASS=password DBUSER=postgres PHP_SAPI=phpdbg
allow_failures:
- env: DB=sqlite
- php: 7.1
- php: 7.0.12 # dist: trusty を動かすためのダミー. 実際にテストは実行されない
env: DB=pgsql USER=postgres DBNAME=myapp_test DBPASS=password DBUSER=postgres PHP_SAPI=phpdbg
env:
- DB=mysql USER=root DBNAME=myapp_test DBPASS=' ' DBUSER=root
- DB=pgsql USER=postgres DBNAME=myapp_test DBPASS=password DBUSER=postgres
- DB=pgsql USER=postgres DBNAME=myapp_test DBPASS=password DBUSER=postgres PHP_SAPI=phpdbg
- DB=sqlite
install:
- gem install mime-types -v 2.99.1
- gem install mailcatcher
before_script:
- CODENAME=$(lsb_release -c -s)
- if [[ $PHP_SAPI != 'phpdbg' ]] || [[ $CODENAME = 'trusty' ]]; then phpenv config-rm xdebug.ini ; fi
- if [[ $PHP_SAPI = 'phpdbg' ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini ; fi
- composer self-update || true
- composer install --dev --no-interaction -o
- php ./eccube_install.php $DB none
- mailcatcher
script: # PHP7 + precise のテストは実行されない
- if [[ $PHP_SAPI = 'phpdbg' ]] && [[ $CODENAME = 'trusty' ]]; then phpdbg -qrr ./vendor/bin/phpunit --coverage-clover=coverage.clover ; fi
- if [[ $PHP_SAPI != 'phpdbg' ]]; then ./vendor/bin/phpunit ; fi
after_script:
- if [[ $PHP_SAPI = 'phpdbg' ]]; then wget https://scrutinizer-ci.com/ocular.phar ; fi
- if [[ $PHP_SAPI = 'phpdbg' ]]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover ; fi
after_success:
- if [[ $PHP_SAPI = 'phpdbg' ]]; then php vendor/bin/coveralls -v -x coverage.clover ; fi
# after_failure:
# - 'cat app/log/site_`date +"%Y-%m-%d"`.log'