forked from spryker-shop/suite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
385 lines (351 loc) · 14.9 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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
language: php
git:
depth: 3
env:
global:
- APPLICATION_ENV=ci.pgsql
- SPRYKER_TESTING_ENABLED=1
- APPLICATION_STORE=DE
- PROJECT=suite
- POSTGRES_PORT="5433"
os: linux
dist: bionic
#Possible travis events (push, pull_request, cron, or api)
jobs:
fast_finish: true
allow_failures: []
include:
- php: "7.4"
dist: bionic
env:
- MP_TEST=1
- php: "7.4"
dist: bionic
env:
- VALIDATION=1
- php: "7.4"
dist: bionic
env:
- TEST_GROUP=acceptance
- php: "7.4"
dist: bionic
env:
- TEST_GROUP=without-acceptance
- php: "7.2"
dist: bionic
env:
- TEST_GROUP=acceptance
- DB_ENGINE=mysql
- APPLICATION_ENV=ci.mysql
- php: "7.2"
dist: bionic
env:
- TEST_GROUP=without-acceptance
- DB_ENGINE=mysql
- APPLICATION_ENV=ci.mysql
- php: "7.2"
# disabled
if: true = false
dist: bionic
env:
- TEST_GROUP=acceptance
- DB_ENGINE=mysql
- APPLICATION_ENV=ci.mysql
- PREFER_LOWEST=1
- php: "7.2"
# disabled
if: true = false
dist: bionic
env:
- TEST_GROUP=without-acceptance
- DB_ENGINE=mysql
- APPLICATION_ENV=ci.mysql
- PREFER_LOWEST=1
- name: Docker / Alpine / PHP 7.4 / PostgreSQL / Functional
os: linux
dist: bionic
language: shell
env:
- PROGRESS_TYPE=plain
- SPRYKER_PLATFORM_IMAGE=spryker/php:7.4
- TRAVIS=1
addons:
hosts:
- yves.de.spryker.local
- zed.de.spryker.local
- glue.de.spryker.local
apt:
packages:
- apache2-utils
- apt-transport-https
- ca-certificates
- curl
- gnupg-agent
- pigz
- software-properties-common
sources:
- sourceline: "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
key_url: https://download.docker.com/linux/ubuntu/gpg
install:
- echo eyAiZXhwZXJpbWVudGFsIiA6IHRydWUsICJmZWF0dXJlcyIgOiB7ICJidWlsZGtpdCI6IHRydWUgfSB9Cg==|base64 -d|sudo tee /etc/docker/daemon.json
- sudo apt-get install --only-upgrade docker-ce -y
- sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
script:
- git clone https://github.com/spryker/docker-sdk.git --single-branch --branch master ./docker
- docker/sdk boot deploy.ci.functional.yml -v
- docker/sdk up -t -v
- docker/sdk testing codecept run -c codeception.ci.functional.yml
before_install: skip
before_script: skip
after_script: skip
- name: Docker / Alpine / PHP 7.3 / PostgreSQL / Glue
os: linux
dist: bionic
language: shell
env:
- PROGRESS_TYPE=plain
- SPRYKER_PLATFORM_IMAGE=spryker/php:7.3
- TRAVIS=1
addons:
hosts:
- yves.de.spryker.local
- zed.de.spryker.local
- glue.de.spryker.local
apt:
packages:
- apache2-utils
- apt-transport-https
- ca-certificates
- curl
- gnupg-agent
- pigz
- software-properties-common
sources:
- sourceline: "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
key_url: https://download.docker.com/linux/ubuntu/gpg
install:
- echo eyAiZXhwZXJpbWVudGFsIiA6IHRydWUsICJmZWF0dXJlcyIgOiB7ICJidWlsZGtpdCI6IHRydWUgfSB9Cg==|base64 -d|sudo tee /etc/docker/daemon.json
- sudo apt-get install --only-upgrade docker-ce -y
- sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
script:
- git clone https://github.com/spryker/docker-sdk.git --single-branch --branch master ./docker
- docker/sdk boot deploy.ci.api.yml -v
- docker/sdk up -t -v
- docker/sdk testing codecept fixtures
- docker/sdk testing console queue:worker:start --stop-when-empty
- docker/sdk testing codecept run -c codeception.api.yml
before_install: skip
before_script: skip
after_script: skip
- name: Docker / Alpine / PHP 7.2 / MariaDB / Functional
os: linux
dist: bionic
language: shell
env:
- PROGRESS_TYPE=plain
- SPRYKER_PLATFORM_IMAGE=spryker/php:7.2
- TRAVIS=1
addons:
hosts:
- yves.de.spryker.local
- zed.de.spryker.local
- glue.de.spryker.local
apt:
packages:
- apache2-utils
- apt-transport-https
- ca-certificates
- curl
- gnupg-agent
- pigz
- software-properties-common
sources:
- sourceline: "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
key_url: https://download.docker.com/linux/ubuntu/gpg
install:
- echo eyAiZXhwZXJpbWVudGFsIiA6IHRydWUsICJmZWF0dXJlcyIgOiB7ICJidWlsZGtpdCI6IHRydWUgfSB9Cg==|base64 -d|sudo tee /etc/docker/daemon.json
- sudo apt-get install --only-upgrade docker-ce -y
- sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
script:
- git clone https://github.com/spryker/docker-sdk.git --single-branch --branch master ./docker
- docker/sdk boot deploy.ci.functional.mariadb.yml -v
- docker/sdk up -t -v
- docker/sdk testing codecept run -c codeception.ci.functional.yml
before_install: skip
before_script: skip
after_script: skip
- name: Docker / Debian / PHP 7.3 / PostgreSQL / Functional
os: linux
dist: bionic
language: shell
env:
- PROGRESS_TYPE=plain
- SPRYKER_PLATFORM_IMAGE=spryker/php:7.3-debian
- TRAVIS=1
addons:
hosts:
- yves.de.spryker.local
- zed.de.spryker.local
- glue.de.spryker.local
apt:
packages:
- apache2-utils
- apt-transport-https
- ca-certificates
- curl
- gnupg-agent
- pigz
- software-properties-common
sources:
- sourceline: "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
key_url: https://download.docker.com/linux/ubuntu/gpg
install:
- echo eyAiZXhwZXJpbWVudGFsIiA6IHRydWUsICJmZWF0dXJlcyIgOiB7ICJidWlsZGtpdCI6IHRydWUgfSB9Cg==|base64 -d|sudo tee /etc/docker/daemon.json
- sudo apt-get install --only-upgrade docker-ce -y
- sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
script:
- git clone https://github.com/spryker/docker-sdk.git --single-branch --branch master ./docker
- docker/sdk boot deploy.ci.functional.yml -v
- docker/sdk up -t -v
- docker/sdk testing codecept run -c codeception.ci.functional.yml
before_install: skip
before_script: skip
after_script: skip
- name: Docker / Alpine / PHP 7.4 / Frontend & Assets
os: linux
dist: bionic
language: shell
env:
- PROGRESS_TYPE=plain
- SPRYKER_PLATFORM_IMAGE=spryker/php:7.4
- TRAVIS=1
addons:
hosts:
- yves.de.spryker.local
- zed.de.spryker.local
- glue.de.spryker.local
apt:
packages:
- apache2-utils
- apt-transport-https
- ca-certificates
- curl
- gnupg-agent
- pigz
- software-properties-common
sources:
- sourceline: "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
key_url: https://download.docker.com/linux/ubuntu/gpg
install:
- echo eyAiZXhwZXJpbWVudGFsIiA6IHRydWUsICJmZWF0dXJlcyIgOiB7ICJidWlsZGtpdCI6IHRydWUgfSB9Cg==|base64 -d|sudo tee /etc/docker/daemon.json
- sudo apt-get install --only-upgrade docker-ce -y
- sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
script:
- git clone https://github.com/spryker/docker-sdk.git --single-branch --branch master ./docker
- docker/sdk boot deploy.yml
- SPRYKER_BUILD_HASH=myhash docker/sdk export images
- docker run -it --rm -e SPRYKER_NGINX_CGI_HOST_YVES_EU=localhost -e SPRYKER_NGINX_CGI_HOST_ZED_EU=localhost -e SPRYKER_NGINX_CGI_HOST_GLUE_EU=localhost -e SPRYKER_NGINX_CGI_HOST_YVES_US=localhost -e SPRYKER_NGINX_CGI_HOST_GLUE_US=localhost -e SPRYKER_NGINX_CGI_HOST_ZED_US=localhost -e ALLOWED_IP=127.0.0.1 spryker_demo_frontend:1.0-frontend nginx -t
- docker run -it --rm --entrypoint='' spryker_demo_frontend:1.0-frontend ls -al /data/public/Yves/assets/myhash
- docker run -it --rm --entrypoint='' spryker_demo_frontend:1.0-frontend ls -al /data/public/Zed/assets/
before_install: skip
before_script: skip
after_script: skip
addons:
apt:
update: true
sources:
- sourceline: ppa:chris-lea/redis-server
- sourceline: deb http://dl.bintray.com/rabbitmq-erlang/debian bionic erlang
key_url: https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc
- sourceline: deb https://dl.bintray.com/rabbitmq/debian bionic main
key_url: https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc
- sourceline: ppa:ondrej/php
packages:
- redis-tools
- redis-server
- rabbitmq-server
- graphviz
- libzip-dev
- postgresql-12
- postgresql-client-12
- postgresql-server-dev-12
- rabbitmq-server
postgresql: "12"
mariadb: "10.3"
hosts:
- zed.de.spryker.test
- www.de.spryker.test
- glue.de.spryker.test
cache:
directories:
- $HOME/.composer/cache
- $HOME/.rvm/gems # Mailcatcher is a ruby gem, takes 5 minutes to install.
- $HOME/.nvm/.cache
- /tmp/pear/cache/
- $HOME/.yarn/cache
- ./node_modules
services:
- postgresql
- redis
before_install:
- phpenv config-add config/Shared/ci/travis/travis.php.ini
- echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- phpenv config-rm xdebug.ini
- composer global require hirak/prestissimo
install:
- chmod -R a+x config/Shared/ci/travis/
- if [[ $PREFER_LOWEST == 1 ]] ; then config/Shared/ci/travis/install_elasticsearch_6_8.sh ; else config/Shared/ci/travis/install_elasticsearch_7_6.sh ; fi
- if [[ $PREFER_LOWEST == 1 ]] ; then composer update --optimize-autoloader --no-interaction --prefer-lowest ; else composer install --optimize-autoloader --no-interaction ; fi
- config/Shared/ci/travis/install_mailcatcher.sh
- if [[ -z $MP_TEST ]] ; then config/Shared/ci/travis/configure_postgres.sh ; fi
before_script:
- nvm install 12 > /dev/null
- mkdir -p shared/data/common/jenkins
- mkdir -p shared/data/common/jenkins/jobs
- mkdir -p data/cache -m 0777
- mkdir -p data/logs -m 0777
- chmod -R 777 data/
- chmod -R 660 config/Zed/dev_only_private.key
- chmod -R 660 config/Zed/dev_only_public.key
- if [[ $VALIDATION == 1 ]] ; then npm install [email protected] -g ; fi
- if [[ $TEST_GROUP == 'acceptance' || $TEST_GROUP == 'without-acceptance' ]] ; then config/Shared/ci/travis/acceptance_env.sh ; fi
- if [[ $TEST_GROUP == 'acceptance' ]] ; then vendor/bin/install DE -r ci ; fi
- if [[ $TEST_GROUP == 'without-acceptance' ]] ; then vendor/bin/install DE -r ci -x frontend -x fixtures ; fi
- if [[ $VALIDATION == 1 ]] ; then vendor/bin/console transfer:generate ; fi
- if [[ $VALIDATION == 1 ]] ; then vendor/bin/console propel:install ; fi
- if [[ $VALIDATION == 1 ]] ; then vendor/bin/console dev:ide-auto-completion:generate ; fi
- if [[ $VALIDATION == 1 ]] ; then vendor/bin/codecept build --ansi ; fi
- if [[ $VALIDATION == 1 ]] ; then vendor/bin/console transfer:databuilder:generate ; fi
- if [[ $VALIDATION == 1 ]] ; then vendor/bin/console setup:search ; fi
- if [[ $VALIDATION == 1 ]] ; then vendor/bin/console rest-api:generate:documentation ; fi
- if [[ $VALIDATION == 1 ]] ; then vendor/bin/console frontend:project:install-dependencies ; fi
- if [[ $VALIDATION == 1 ]] ; then vendor/bin/console frontend:yves:install-dependencies ; fi
# Puppeteer installs chromium binary which we will use for headless unit tests
- if [[ $MP_TEST == 1 ]] ; then vendor/bin/console transfer:generate ; fi
- if [[ $MP_TEST == 1 ]] ; then npm i -g puppeteer && npm link puppeteer ; fi
- if [[ $MP_TEST == 1 ]] ; then unset CHROME_BIN && export CHROME_BIN=$(node -e "console.log(require('puppeteer').executablePath())") ; fi
# Install npm packages
- if [[ $MP_TEST == 1 ]] ; then export YARN_CACHE_FOLDER=$HOME/.yarn/cache && vendor/bin/console frontend:mp:install-dependencies ; fi
script:
- if [[ $VALIDATION == 1 ]] ; then vendor/bin/console propel:schema:validate ; fi
- if [[ $VALIDATION == 1 ]] ; then vendor/bin/console propel:schema:validate-xml-names ; fi
- if [[ $VALIDATION == 1 ]] ; then vendor/bin/console transfer:validate ; fi
- if [[ $VALIDATION == 1 ]] ; then vendor/bin/console code:sniff:style ; fi
- if [[ $VALIDATION == 1 ]] ; then speccy lint src/Generated/Glue/Specification/spryker_rest_api.schema.yml --rules=default ; fi
- if [[ $VALIDATION == 1 ]] ; then vendor/bin/phpmd src/ text vendor/spryker/architecture-sniffer/src/ruleset.xml --minimumpriority 2 ; fi
- if [[ $VALIDATION == 1 ]] ; then vendor/bin/phpstan analyze -l 5 -c phpstan.neon src/ ; fi
- if [[ $VALIDATION == 1 ]] ; then vendor/bin/psalm.phar --show-info=false ; fi
- timeout 45m bash -c "vendor/bin/phantomjs --webdriver=4444 --disk-cache=true --load-images=false" &
- if [[ $TEST_GROUP == 'without-acceptance' ]] ; then vendor/bin/codecept run -c codeception.functional.yml --ext DotReporter ; fi
- if [[ $TEST_GROUP == 'acceptance' ]] ; then vendor/bin/codecept run -g EndToEnd -g Presentation -x DockerOnly --ext DotReporter ; fi
- if [[ $VALIDATION == 1 ]] ; then node ./frontend/libs/stylelint ; fi
- if [[ $VALIDATION == 1 ]] ; then node ./frontend/libs/tslint stylish ; fi
- if [[ $MP_TEST == 1 ]] ; then vendor/bin/console frontend:mp:build ; fi
- if [[ $MP_TEST == 1 ]] ; then yarn mp:test ; fi
notifications:
email: false