forked from pimcore/pimcore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
220 lines (194 loc) · 5.36 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
# see https://docs.travis-ci.com/user/customizing-the-build/
notifications:
email:
- travis-ci@pimcore.org
branches:
only:
- master
- /^v?\d+\..*/
- /.*_travis$/
sudo: false
language: php
services:
- redis
- mysql
# see https://docs.travis-ci.com/user/installing-dependencies
addons:
artifacts:
s3_region: "eu-west-1" # see https://docs.aws.amazon.com/general/latest/gr/rande.html
debug: true
paths: # - $(ls var/logs/*.log | tr "\n" ":")
# - app/config
- var/logs
- tests/_output/var/classes
- phpstan-baseline.neon
hosts:
- pimcore-test.dev
# see https://docs.travis-ci.com/user/build-matrix/
jobs:
allow_failures:
# Run PHPStan level 3 without baseline, but allow them to fail
-
os: linux
php: 7.4
env:
- SYMFONY_VERSION="^3.4"
- TASK_TESTS=0
- TASK_STAN=1
- PHPSTAN_BASELINE=0
- os: linux
php: 7.4
env:
- TASK_TESTS=0
- TASK_STAN=1
- PHPSTAN_BASELINE=0
include:
# Symfony 3.4 all tests
- name: "All Tests - PHP 7.2 | Symfony 3.4 | MariaDB 10.1"
os: linux
sudo: required
php: 7.2
env:
- SYMFONY_VERSION="^3.4"
- DATABASE_SERVER="mariadb-10.1"
- name: "All Tests - PHP 7.3 | Symfony 3.4 | MariaDB 10.2"
os: linux
sudo: required
php: 7.3
env:
- SYMFONY_VERSION="^3.4"
- DATABASE_SERVER="mariadb-10.2"
- name: "All Tests - PHP 7.4 | Symfony 3.4 | MySQL 5.7"
os: linux
sudo: required
php: 7.4
env:
- SYMFONY_VERSION="^3.4"
- DATABASE_SERVER="mysql-5.7"
# Symfony 4.* all tests
- name: "All Tests - PHP 7.2 | Symfony 4 | MariaDB 10.3"
os: linux
sudo: required
php: 7.2
env:
- DATABASE_SERVER="mariadb-10.3"
- name: "All Tests - PHP 7.3 | Symfony 4 | MariaDB 10.4"
os: linux
sudo: required
php: 7.3
env:
- DATABASE_SERVER="mariadb-10.4"
- name: "All Tests - PHP 7.4 | Symfony 4 | Percona 5.6"
os: linux
sudo: required
php: 7.4
env:
- DATABASE_SERVER="percona-server-5.6"
# Other Tests
- name: "REST Tests - PHP 7.2 | Symfony 3.4 | MySQL 8.0"
os: linux
sudo: required
php: 7.2
env:
- SYMFONY_VERSION="^3.4"
- PIMCORE_TEST_SUITE=Rest
- PIMCORE_TEST_ENV=http
- DATABASE_SERVER="mysql-8.0"
- name: "REST Tests - PHP 7.3 | Symfony 3.4"
os: linux
sudo: required
php: 7.3
env:
- SYMFONY_VERSION="^3.4"
- PIMCORE_TEST_SUITE=Rest
- PIMCORE_TEST_ENV=http
# Test Stan - see https://github.com/phpstan/phpstan
- name: "PHPStan Level 3 - PHP 7.4 Symfony 3.4 baseline"
os: linux
php: 7.4
env:
- SYMFONY_VERSION="^3.4"
- TASK_TESTS=0
- TASK_STAN=1
- name: "PHPStan Level 3 - PHP 7.4 Symfony 3.4"
os: linux
php: 7.4
env:
- SYMFONY_VERSION="^3.4"
- TASK_TESTS=0
- TASK_STAN=1
- PHPSTAN_BASELINE=0
# Test Stan Symfony ^4.0
- name: "PHPStan Level 3 - PHP 7.4 Symfony 4 baseline"
os: linux
php: 7.4
env:
- TASK_TESTS=0
- TASK_STAN=1
- name: "PHPStan Level 3 - PHP 7.4 Symfony 4"
os: linux
php: 7.4
env:
- TASK_TESTS=0
- TASK_STAN=1
- PHPSTAN_BASELINE=0
- name: "PHPStan Level 3 - PHP 7.4 Symfony 4 - Generate baseline"
os: linux
php: 7.4
env:
- TASK_TESTS=0
- TASK_STAN=1
- PHPSTAN_BASELINE_GENERATE=1
# Test Docs
- name: "Documentation"
os: linux
php: 7.2
env:
- TASK_TESTS=0
- TASK_DOCS=1
cache:
directories:
- tmp-docs/pimcore-docs/vendor
fast_finish: true
cache:
directories:
- $HOME/.cache/composer
env:
global:
- COMPOSER_MEMORY_LIMIT=-1
- TASK_TESTS=1
- TASK_STAN=0
- TASK_DOCS=0
- PHPSTAN_LEVEL=3
- PHPSTAN_BASELINE=1
- PHPSTAN_BASELINE_GENERATE=0
- PIMCORE_ENVIRONMENT=test
- PIMCORE_TEST=1
- PIMCORE_TEST_URL=http://pimcore-test.dev
- PIMCORE_TEST_DB_DSN="mysql://root@localhost/pimcore_test"
- PIMCORE_TEST_CACHE_REDIS_DATABASE=1
- SYMFONY_VERSION=^4.0
- DATABASE_SERVER="mariadb-10.4"
- PIMCORE_PROJECT_ROOT=$TRAVIS_BUILD_DIR
- PIMCORE_PHP_ERROR_REPORTING=32767 # E_ALL
# see https://docs.travis-ci.com/user/job-lifecycle/
before_install:
# see https://docs.travis-ci.com/user/job-lifecycle/
install:
- if [ $TASK_TESTS == 1 ]; then .travis/setup-tests.sh; fi
- if [ $TASK_STAN == 1 ]; then .travis/setup-tests.sh; fi
- if [ $TASK_DOCS == 1 ]; then .travis/setup-docs.sh; fi
# see https://docs.travis-ci.com/user/job-lifecycle/
before_script:
- yes | pecl install imagick
- phpenv config-rm xdebug.ini || true
- if [ $TASK_TESTS == 1 ]; then .travis/setup-php.sh; fi
- if [ $TASK_TESTS == 1 ]; then .travis/setup-functional-tests.sh; fi
- if [ $TASK_STAN == 1 ]; then .travis/setup-php.sh; fi
- mysql --version
- mysql -e "CREATE DATABASE pimcore_test CHARSET=utf8mb4;"
# see https://docs.travis-ci.com/user/job-lifecycle/
script:
- if [ $TASK_TESTS == 1 ]; then .travis/run-tests.sh; fi
- if [ $TASK_DOCS == 1 ]; then .travis/run-docs.sh; fi
- if [ $TASK_STAN == 1 ]; then .travis/run-stan.sh; fi