forked from asno-sys/ec-cube3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
120 lines (110 loc) · 3.98 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# for travis-ci
# see also. https://travis-ci.org
git:
submodules: false
language: php
services:
- docker
- mysql
- postgresql
cache:
directories:
- vendor
- $HOME/.composer/cache
php:
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4snapshot
dist: xenial
matrix:
fast_finish: true
include:
- php: 5.3
env: DB=mysql USER=root DBNAME=myapp_test DBPASS=' ' DBUSER=root
dist: precise
- php: 5.3
env: DB=pgsql USER=postgres DBNAME=myapp_test DBPASS=password DBUSER=postgres
dist: precise
- php: 5.3
env: DB=sqlite
dist: precise
- php: 5.4
env: DB=mysql USER=root DBNAME=myapp_test DBPASS=' ' DBUSER=root
dist: precise
- php: 5.4
env: DB=pgsql USER=postgres DBNAME=myapp_test DBPASS=password DBUSER=postgres
dist: precise
- php: 5.4
env: DB=sqlite
dist: precise
- php: 5.5
env: DB=mysql USER=root DBNAME=myapp_test DBPASS=' ' DBUSER=root
dist: precise
- php: 5.5
env: DB=pgsql USER=postgres DBNAME=myapp_test DBPASS=password DBUSER=postgres
dist: precise
- php: 5.5
env: DB=sqlite
dist: precise
- 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
- php: 5.4
- php: 5.5
- 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
- php: 7.2
env: DB=pgsql USER=postgres DBNAME=myapp_test DBPASS=password DBUSER=postgres PHP_SAPI=phpdbg
- php: 7.3
env: DB=pgsql USER=postgres DBNAME=myapp_test DBPASS=password DBUSER=postgres PHP_SAPI=phpdbg
- php: 7.4snapshot
env: DB=pgsql USER=postgres DBNAME=myapp_test DBPASS=password DBUSER=postgres PHP_SAPI=phpdbg
allow_failures:
- php: 7.2
- php: 7.3
- php: 7.4snapshot
- 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 -v "0.6.5"
before_script:
- CODENAME=$(lsb_release -c -s)
- if [[ $TRAVIS_PHP_VERSION != '7.4snapshot' ]]; 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 --1 || 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
- 'sed -i -e "s|force_ssl:\(.*\)|force_ssl: 1|" app/config/eccube/config.yml' # force_ssl を有効にしてテスト
- if [[ $PHP_SAPI != 'phpdbg' ]]; then ./vendor/bin/phpunit tests/Eccube/Tests/Web/SameSiteCookieTest.php ; 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'