[TASK] Allow runTests.sh on Windows WSL
[Packages/TYPO3.CMS.git] / Build / testing-docker / local / docker-compose.yml
1 version: '2.3'
2 services:
3   chrome:
4     image: selenium/standalone-chrome:3.12
5
6   mariadb10:
7     image: mariadb:10
8     environment:
9       MYSQL_ROOT_PASSWORD: funcp
10     tmpfs:
11       - /var/lib/mysql/:rw,noexec,nosuid
12
13   mssql2017cu9:
14     image: microsoft/mssql-server-linux:2017-CU9
15     environment:
16       ACCEPT_EULA: Y
17       SA_PASSWORD: "Test1234!"
18       MSSQL_PID: Developer
19     # No tmpfs setup here since mssql fails on tmpfs o_direct.
20     # This makes mssql sloooow for functionals.
21
22   postgres10:
23     image: postgres:10
24     environment:
25       POSTGRES_PASSWORD: funcp
26       POSTGRES_USER: ${HOST_USER}
27     tmpfs:
28       - /var/lib/postgresql/data:rw,noexec,nosuid
29
30   web:
31     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
32     user: ${HOST_UID}
33     stop_grace_period: 1s
34     volumes:
35       - ${CORE_ROOT}:${CORE_ROOT}
36     command: php -n -c /etc/php/cli-no-xdebug/php.ini -S web:8000 -t ${CORE_ROOT}
37
38   redis4:
39     image: redis:4-alpine
40
41   memcached1-5:
42     image: memcached:1.5-alpine
43
44
45   prepare_acceptance_backend_mariadb10:
46     image: alpine:3.8
47     links:
48       - mariadb10
49       - chrome
50       - web
51     command: >
52       /bin/sh -c "
53         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
54           set -x
55         fi
56         echo Waiting for database start...;
57         while ! nc -z mariadb10 3306; do
58           sleep 1;
59         done;
60         echo Database is up;
61       "
62   acceptance_backend_mariadb10:
63     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
64     user: ${HOST_UID}
65     environment:
66       typo3DatabaseName: func_test
67       typo3DatabaseUsername: root
68       typo3DatabasePassword: funcp
69       typo3DatabaseHost: mariadb10
70     volumes:
71       - ${CORE_ROOT}:${CORE_ROOT}
72       - ${HOST_HOME}:${HOST_HOME}
73       - /etc/passwd:/etc/passwd:ro
74       - /etc/group:/etc/group:ro
75     working_dir: ${CORE_ROOT}
76     command: >
77       /bin/sh -c "
78         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
79           set -x
80         fi
81         mkdir -p typo3temp/var/tests/ \
82           && ./bin/codecept run Backend -d -c typo3/sysext/core/Tests/codeception.yml ${TEST_FILE}
83       "
84
85   prepare_acceptance_install_mariadb10:
86     image: alpine:3.8
87     links:
88       - mariadb10
89       - chrome
90       - web
91     command: >
92       /bin/sh -c "
93         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
94           set -x
95         fi
96         echo Waiting for database start...;
97         while ! nc -z mariadb10 3306; do
98           sleep 1;
99         done;
100         echo Database is up;
101       "
102   acceptance_install_mariadb10:
103     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
104     user: ${HOST_UID}
105     environment:
106       typo3InstallMysqlDatabaseHost: mariadb10
107       typo3InstallMysqlDatabaseName: func_test
108       typo3InstallMysqlDatabaseUsername: root
109       typo3InstallMysqlDatabasePassword: funcp
110     volumes:
111       - ${CORE_ROOT}:${CORE_ROOT}
112       - ${HOST_HOME}:${HOST_HOME}
113       - /etc/passwd:/etc/passwd:ro
114       - /etc/group:/etc/group:ro
115     working_dir: ${CORE_ROOT}
116     command: >
117       /bin/sh -c "
118         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
119           set -x
120         fi
121         mkdir -p typo3temp/var/tests/ \
122           && ./bin/codecept run Install -d -c typo3/sysext/core/Tests/codeception.yml --env=mysql
123       "
124
125   prepare_acceptance_install_postgres10:
126     image: alpine:3.8
127     links:
128       - postgres10
129       - chrome
130       - web
131     command: >
132       /bin/sh -c "
133         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
134           set -x
135         fi
136         echo Waiting for database start...;
137         while ! nc -z postgres10 5432; do
138           sleep 1;
139         done;
140         echo Database is up;
141       "
142   acceptance_install_postgres10:
143     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
144     user: ${HOST_UID}
145     environment:
146       typo3InstallPostgresqlDatabaseHost: postgres10
147       typo3InstallPostgresqlDatabaseName: ${HOST_USER}
148       typo3InstallPostgresqlDatabaseUsername: ${HOST_USER}
149       typo3InstallPostgresqlDatabasePassword: funcp
150     working_dir: ${CORE_ROOT}
151     volumes:
152       - ${CORE_ROOT}:${CORE_ROOT}
153       - ${HOST_HOME}:${HOST_HOME}
154       - /etc/passwd:/etc/passwd:ro
155       - /etc/group:/etc/group:ro
156     command: >
157       /bin/sh -c "
158         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
159           set -x
160         fi
161         mkdir -p typo3temp/var/tests/ \
162           && ./bin/codecept run Install -d -c typo3/sysext/core/Tests/codeception.yml --env=postgresql
163       "
164
165   prepare_acceptance_install_sqlite:
166     image: alpine:3.8
167     links:
168       - chrome
169       - web
170     command: >
171       /bin/sh -c "
172         sleep 1;
173       "
174   acceptance_install_sqlite:
175     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
176     user: ${HOST_UID}
177     volumes:
178       - ${CORE_ROOT}:${CORE_ROOT}
179       - ${HOST_HOME}:${HOST_HOME}
180       - /etc/passwd:/etc/passwd:ro
181       - /etc/group:/etc/group:ro
182     working_dir: ${CORE_ROOT}
183     command: >
184       /bin/sh -c "
185         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
186           set -x
187         fi
188         mkdir -p typo3temp/var/tests/ \
189           && ./bin/codecept run Install -d -c typo3/sysext/core/Tests/codeception.yml --env=sqlite
190       "
191
192   build_css:
193     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
194     user: ${HOST_UID}
195     volumes:
196     - ${CORE_ROOT}:${CORE_ROOT}
197     - ${HOST_HOME}:${HOST_HOME}
198     - /etc/passwd:/etc/passwd:ro
199     - /etc/group:/etc/group:ro
200     working_dir: ${CORE_ROOT}/Build
201     command: >
202       /bin/sh -c "
203         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
204           set -x
205         fi
206         yarn install \
207           && ./node_modules/grunt/bin/grunt css
208       "
209
210   build_javascript:
211     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
212     user: ${HOST_UID}
213     volumes:
214     - ${CORE_ROOT}:${CORE_ROOT}
215     - ${HOST_HOME}:${HOST_HOME}
216     - /etc/passwd:/etc/passwd:ro
217     - /etc/group:/etc/group:ro
218     working_dir: ${CORE_ROOT}/Build
219     command: >
220       /bin/sh -c "
221         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
222           set -x
223         fi
224         yarn install \
225           && ./node_modules/grunt/bin/grunt scripts
226       "
227
228   cgl_git:
229     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
230     user: ${HOST_UID}
231     volumes:
232     - ${CORE_ROOT}:${CORE_ROOT}
233     - ${HOST_HOME}:${HOST_HOME}
234     - /etc/passwd:/etc/passwd:ro
235     - /etc/group:/etc/group:ro
236     working_dir: ${CORE_ROOT}
237     command: >
238       /bin/sh -c "
239         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
240           set -x
241         fi
242         Build/Scripts/cglFixMyCommit.sh ${CGLCHECK_DRY_RUN};
243       "
244
245   cgl_all:
246     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
247     user: ${HOST_UID}
248     volumes:
249     - ${CORE_ROOT}:${CORE_ROOT}
250     - ${HOST_HOME}:${HOST_HOME}
251     - /etc/passwd:/etc/passwd:ro
252     - /etc/group:/etc/group:ro
253     working_dir: ${CORE_ROOT}
254     command: >
255       /bin/sh -c "
256         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
257           set -x
258         fi
259         php -n -c /etc/php/cli-no-xdebug/php.ini bin/php-cs-fixer fix -v ${CGLCHECK_DRY_RUN} --path-mode intersection \
260           --config=Build/.php_cs typo3/
261       "
262
263   check_annotations:
264     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
265     user: ${HOST_UID}
266     volumes:
267     - ${CORE_ROOT}:${CORE_ROOT}
268     - ${HOST_HOME}:${HOST_HOME}
269     - /etc/passwd:/etc/passwd:ro
270     - /etc/group:/etc/group:ro
271     working_dir: ${CORE_ROOT}
272     command: >
273       /bin/sh -c "
274         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
275           set -x
276         fi
277         Build/Scripts/annotationChecker.php;
278       "
279
280   check_composer:
281     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
282     user: ${HOST_UID}
283     volumes:
284     - ${CORE_ROOT}:${CORE_ROOT}
285     - ${HOST_HOME}:${HOST_HOME}
286     - /etc/passwd:/etc/passwd:ro
287     - /etc/group:/etc/group:ro
288     working_dir: ${CORE_ROOT}
289     command: >
290       /bin/sh -c "
291         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
292           set -x
293         fi
294         Build/Scripts/checkIntegrityComposer.php;
295       "
296
297   check_csv_fixtures:
298     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
299     user: ${HOST_UID}
300     volumes:
301     - ${CORE_ROOT}:${CORE_ROOT}
302     - ${HOST_HOME}:${HOST_HOME}
303     - /etc/passwd:/etc/passwd:ro
304     - /etc/group:/etc/group:ro
305     working_dir: ${CORE_ROOT}
306     command: >
307       /bin/sh -c "
308         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
309           set -x
310         fi
311         Build/Scripts/checkIntegrityCsvFixtures.php;
312       "
313
314   check_exception_codes:
315     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
316     user: ${HOST_UID}
317     volumes:
318     - ${CORE_ROOT}:${CORE_ROOT}
319     - ${HOST_HOME}:${HOST_HOME}
320     - /etc/passwd:/etc/passwd:ro
321     - /etc/group:/etc/group:ro
322     working_dir: ${CORE_ROOT}
323     command: >
324       /bin/sh -c "
325         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
326           set -x
327         fi
328         Build/Scripts/duplicateExceptionCodeCheck.sh;
329       "
330
331   check_extension_scanner_rst:
332     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
333     user: ${HOST_UID}
334     volumes:
335     - ${CORE_ROOT}:${CORE_ROOT}
336     - ${HOST_HOME}:${HOST_HOME}
337     - /etc/passwd:/etc/passwd:ro
338     - /etc/group:/etc/group:ro
339     working_dir: ${CORE_ROOT}
340     command: >
341       /bin/sh -c "
342         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
343           set -x
344         fi
345         Build/Scripts/extensionScannerRstFileReferences.php;
346       "
347
348   check_file_path_length:
349     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
350     user: ${HOST_UID}
351     volumes:
352     - ${CORE_ROOT}:${CORE_ROOT}
353     - ${HOST_HOME}:${HOST_HOME}
354     - /etc/passwd:/etc/passwd:ro
355     - /etc/group:/etc/group:ro
356     working_dir: ${CORE_ROOT}
357     command: >
358       /bin/sh -c "
359         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
360           set -x
361         fi
362         Build/Scripts/maxFilePathLength.sh;
363       "
364
365   check_git_submodule:
366     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
367     user: ${HOST_UID}
368     volumes:
369     - ${CORE_ROOT}:${CORE_ROOT}
370     - ${HOST_HOME}:${HOST_HOME}
371     - /etc/passwd:/etc/passwd:ro
372     - /etc/group:/etc/group:ro
373     working_dir: ${CORE_ROOT}
374     command: >
375       /bin/sh -c "
376         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
377           set -x
378         fi
379         if [ `git submodule status 2>&1 | wc -l` -ne 0 ]; then
380           echo \"Found a submodule definition in repository\";
381           exit 1;
382         fi
383       "
384
385   check_permissions:
386     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
387     user: ${HOST_UID}
388     volumes:
389     - ${CORE_ROOT}:${CORE_ROOT}
390     - ${HOST_HOME}:${HOST_HOME}
391     - /etc/passwd:/etc/passwd:ro
392     - /etc/group:/etc/group:ro
393     working_dir: ${CORE_ROOT}
394     command: >
395       /bin/sh -c "
396         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
397           set -x
398         fi
399         Build/Scripts/checkFilePermissions.sh;
400       "
401
402   check_rst:
403     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
404     user: ${HOST_UID}
405     volumes:
406     - ${CORE_ROOT}:${CORE_ROOT}
407     - ${HOST_HOME}:${HOST_HOME}
408     - /etc/passwd:/etc/passwd:ro
409     - /etc/group:/etc/group:ro
410     working_dir: ${CORE_ROOT}
411     command: >
412       /bin/sh -c "
413         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
414           set -x
415         fi
416         Build/Scripts/validateRstFiles.php;
417       "
418
419   check_xlf:
420     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
421     user: ${HOST_UID}
422     volumes:
423     - ${CORE_ROOT}:${CORE_ROOT}
424     - ${HOST_HOME}:${HOST_HOME}
425     - /etc/passwd:/etc/passwd:ro
426     - /etc/group:/etc/group:ro
427     working_dir: ${CORE_ROOT}
428     command: >
429       /bin/sh -c "
430         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
431           set -x
432         fi
433         Build/Scripts/xlfcheck.sh;
434       "
435
436   composer_install:
437     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
438     user: ${HOST_UID}
439     volumes:
440     - ${CORE_ROOT}:${CORE_ROOT}
441     - ${HOST_HOME}:${HOST_HOME}
442     - /etc/passwd:/etc/passwd:ro
443     - /etc/group:/etc/group:ro
444     working_dir: ${CORE_ROOT}
445     command: >
446       /bin/sh -c "
447         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
448           set -x
449         fi
450         composer install;
451       "
452
453   composer_validate:
454     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
455     user: ${HOST_UID}
456     volumes:
457     - ${CORE_ROOT}:${CORE_ROOT}
458     - ${HOST_HOME}:${HOST_HOME}
459     - /etc/passwd:/etc/passwd:ro
460     - /etc/group:/etc/group:ro
461     working_dir: ${CORE_ROOT}
462     command: >
463       /bin/sh -c "
464         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
465           set -x
466         fi
467         composer validate;
468       "
469
470   prepare_functional_mariadb10:
471     image: alpine:3.8
472     links:
473       - mariadb10
474       - redis4
475       - memcached1-5
476     command: >
477       /bin/sh -c "
478         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
479           set -x
480         fi
481         echo Waiting for database start...;
482         while ! nc -z mariadb10 3306; do
483           sleep 1;
484         done;
485         echo Database is up;
486       "
487   functional_mariadb10:
488     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
489     user: ${HOST_UID}
490     volumes:
491       - ${CORE_ROOT}:${CORE_ROOT}
492       - ${HOST_HOME}:${HOST_HOME}
493       - /etc/passwd:/etc/passwd:ro
494       - /etc/group:/etc/group:ro
495     environment:
496       typo3DatabaseName: func_test
497       typo3DatabaseUsername: root
498       typo3DatabasePassword: funcp
499       typo3DatabaseHost: mariadb10
500       typo3TestingRedisHost: redis4
501       typo3TestingMemcachedHost: memcached1-5
502     working_dir: ${CORE_ROOT}
503     command: >
504       /bin/sh -c "
505         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
506           set -x
507         fi
508         php -v | grep '^PHP'
509         if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
510           php -n -c /etc/php/cli-no-xdebug/php.ini \
511             vendor/phpunit/phpunit/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE};
512         else
513           DOCKER_HOST=`route -n | awk '/^0.0.0.0/ { print $$2 }'`
514           XDEBUG_CONFIG=\"remote_port=${PHP_XDEBUG_PORT} remote_enable=1 remote_host=$${DOCKER_HOST}\" \
515             vendor/phpunit/phpunit/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE};
516         fi
517       "
518
519   prepare_functional_mssql2017cu9:
520     image: alpine:3.8
521     links:
522       - mssql2017cu9
523       - redis4
524       - memcached1-5
525     command: >
526       /bin/sh -c "
527         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
528           set -x
529         fi
530         echo Waiting for database start...;
531         while ! nc -z mssql2017cu9 1433; do
532           sleep 1;
533         done;
534         echo Database is up;
535       "
536   functional_mssql2017cu9:
537     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
538     user: ${HOST_UID}
539     volumes:
540       - ${CORE_ROOT}:${CORE_ROOT}
541       - ${HOST_HOME}:${HOST_HOME}
542       - /etc/passwd:/etc/passwd:ro
543       - /etc/group:/etc/group:ro
544     environment:
545       typo3DatabaseDriver: sqlsrv
546       typo3DatabaseName: func
547       typo3DatabasePassword: "Test1234!"
548       typo3DatabaseUsername: SA
549       typo3DatabasePort: 1433
550       typo3DatabaseCharset: utf-8
551       typo3DatabaseHost: mssql2017cu9
552       typo3TestingRedisHost: redis4
553       typo3TestingMemcachedHost: memcached1-5
554     working_dir: ${CORE_ROOT}
555     command: >
556       /bin/sh -c "
557         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
558           set -x
559         fi
560         php -v | grep '^PHP'
561         if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
562           php -n -c /etc/php/cli-no-xdebug/php.ini \
563             vendor/phpunit/phpunit/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml ${EXTRA_TEST_OPTIONS} --exclude-group not-mssql ${TEST_FILE};
564         else
565           DOCKER_HOST=`route -n | awk '/^0.0.0.0/ { print $$2 }'`
566           XDEBUG_CONFIG=\"remote_port=${PHP_XDEBUG_PORT} remote_enable=1 remote_host=$${DOCKER_HOST}\" \
567             vendor/phpunit/phpunit/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml ${EXTRA_TEST_OPTIONS} --exclude-group not-mssql ${TEST_FILE};
568         fi
569       "
570
571   prepare_functional_postgres10:
572     image: alpine:3.8
573     links:
574       - postgres10
575       - redis4
576       - memcached1-5
577     command: >
578       /bin/sh -c "
579         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
580           set -x
581         fi
582         echo Waiting for database start...;
583         while ! nc -z postgres10 5432; do
584           sleep 1;
585         done;
586         echo Database is up;
587       "
588   functional_postgres10:
589     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
590     user: ${HOST_UID}
591     volumes:
592       - ${CORE_ROOT}:${CORE_ROOT}
593       - ${HOST_HOME}:${HOST_HOME}
594       - /etc/passwd:/etc/passwd:ro
595       - /etc/group:/etc/group:ro
596     environment:
597       typo3DatabaseDriver: pdo_pgsql
598       typo3DatabaseName: bamboo
599       typo3DatabaseUsername: ${HOST_USER}
600       typo3DatabaseHost: postgres10
601       typo3DatabasePassword: funcp
602       typo3TestingRedisHost: redis4
603       typo3TestingMemcachedHost: memcached1-5
604     working_dir: ${CORE_ROOT}
605     command: >
606       /bin/sh -c "
607         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
608           set -x
609         fi
610         php -v | grep '^PHP'
611         if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
612           php -n -c /etc/php/cli-no-xdebug/php.ini \
613             vendor/phpunit/phpunit/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml ${EXTRA_TEST_OPTIONS} --exclude-group not-postgres ${TEST_FILE};
614         else
615           DOCKER_HOST=`route -n | awk '/^0.0.0.0/ { print $$2 }'`
616           XDEBUG_CONFIG=\"remote_port=${PHP_XDEBUG_PORT} remote_enable=1 remote_host=$${DOCKER_HOST}\" \
617             vendor/phpunit/phpunit/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml ${EXTRA_TEST_OPTIONS} --exclude-group not-postgres ${TEST_FILE};
618         fi
619       "
620
621   prepare_functional_sqlite:
622     image: alpine:3.8
623     links:
624       - redis4
625       - memcached1-5
626     command: >
627       /bin/sh -c "
628         sleep 1;
629       "
630   functional_sqlite:
631     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
632     user: ${HOST_UID}
633     volumes:
634       - ${CORE_ROOT}:${CORE_ROOT}
635       - ${HOST_HOME}:${HOST_HOME}
636       - /etc/passwd:/etc/passwd:ro
637       - /etc/group:/etc/group:ro
638       # @todo: sqlite DB is currently written to functional-doc-root (typo3temp/var/test-functional-xy/) /test.sqlite
639       # This directory is mapped to the local dir, so it is hard disk and not a tmpfs. sqlite functionals would speed
640       # up significantly if typo3/testing-framework would accept an environment variable to locate test.sqlite file on
641       # some tmpfs mount. Note this is not an issue within bamboo since in bamboo the entire core checkout is a tmpfs already.
642     environment:
643       typo3DatabaseDriver: pdo_sqlite
644       typo3TestingRedisHost: redis4
645       typo3TestingMemcachedHost: memcached1-5
646     working_dir: ${CORE_ROOT}
647     command: >
648       /bin/sh -c "
649         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
650           set -x
651         fi
652         php -v | grep '^PHP'
653         if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
654           php -n -c /etc/php/cli-no-xdebug/php.ini \
655             vendor/phpunit/phpunit/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml ${EXTRA_TEST_OPTIONS} --exclude-group not-sqlite ${TEST_FILE};
656         else
657           DOCKER_HOST=`route -n | awk '/^0.0.0.0/ { print $$2 }'`
658           XDEBUG_CONFIG=\"remote_port=${PHP_XDEBUG_PORT} remote_enable=1 remote_host=$${DOCKER_HOST}\" \
659             vendor/phpunit/phpunit/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml ${EXTRA_TEST_OPTIONS} --exclude-group not-sqlite ${TEST_FILE};
660         fi
661       "
662
663   lint:
664     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
665     user: ${HOST_UID}
666     volumes:
667     - ${CORE_ROOT}:${CORE_ROOT}
668     - /etc/passwd:/etc/passwd:ro
669     - /etc/group:/etc/group:ro
670     working_dir: ${CORE_ROOT}
671     command: >
672       /bin/sh -c "
673         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
674           set -x
675         fi
676         php -v | grep '^PHP'
677         find typo3/ -name \\*.php -print0 | xargs -0 -n1 -P4 php -n -c /etc/php/cli-no-xdebug/php.ini -l >/dev/null
678       "
679
680   lint_scss:
681     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
682     user: ${HOST_UID}
683     volumes:
684     - ${CORE_ROOT}:${CORE_ROOT}
685     - ${HOST_HOME}:${HOST_HOME}
686     - /etc/passwd:/etc/passwd:ro
687     - /etc/group:/etc/group:ro
688     working_dir: ${CORE_ROOT}/Build
689     command: >
690       /bin/sh -c "
691         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
692           set -x
693         fi
694         yarn install \
695           && ./node_modules/grunt/bin/grunt stylelint;
696       "
697
698   lint_typescript:
699     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
700     user: ${HOST_UID}
701     volumes:
702     - ${CORE_ROOT}:${CORE_ROOT}
703     - ${HOST_HOME}:${HOST_HOME}
704     - /etc/passwd:/etc/passwd:ro
705     - /etc/group:/etc/group:ro
706     working_dir: ${CORE_ROOT}/Build
707     command: >
708       /bin/sh -c "
709         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
710           set -x
711         fi
712         yarn install \
713           && ./node_modules/grunt/bin/grunt tslint;
714       "
715
716   unit:
717     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
718     user: ${HOST_UID}
719     volumes:
720       - ${CORE_ROOT}:${CORE_ROOT}
721       - ${HOST_HOME}:${HOST_HOME}
722       - /etc/passwd:/etc/passwd:ro
723       - /etc/group:/etc/group:ro
724     working_dir: ${CORE_ROOT}
725     command: >
726       /bin/sh -c "
727         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
728           set -x
729         fi
730         php -v | grep '^PHP'
731         if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
732           php -n -c /etc/php/cli-no-xdebug/php.ini \
733             vendor/phpunit/phpunit/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE};
734         else
735           DOCKER_HOST=`route -n | awk '/^0.0.0.0/ { print $$2 }'`
736           XDEBUG_CONFIG=\"remote_port=${PHP_XDEBUG_PORT} remote_enable=1 remote_host=$${DOCKER_HOST}\" \
737             vendor/phpunit/phpunit/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE};
738         fi
739       "
740
741   unitDeprecated:
742     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
743     user: ${HOST_UID}
744     volumes:
745       - ${CORE_ROOT}:${CORE_ROOT}
746       - ${HOST_HOME}:${HOST_HOME}
747       - /etc/passwd:/etc/passwd:ro
748       - /etc/group:/etc/group:ro
749     working_dir: ${CORE_ROOT}
750     command: >
751       /bin/sh -c "
752         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
753           set -x
754         fi
755         php -v | grep '^PHP'
756         if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
757           php -n -c /etc/php/cli-no-xdebug/php.ini \
758             vendor/phpunit/phpunit/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/UnitTestsDeprecated.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE};
759         else
760           DOCKER_HOST=`route -n | awk '/^0.0.0.0/ { print $$2 }'`
761           XDEBUG_CONFIG=\"remote_port=${PHP_XDEBUG_PORT} remote_enable=1 remote_host=$${DOCKER_HOST}\" \
762             vendor/phpunit/phpunit/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/UnitTestsDeprecated.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE};
763         fi
764       "
765
766   unitJavascript:
767     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
768     user: ${HOST_UID}
769     volumes:
770       - ${CORE_ROOT}:${CORE_ROOT}
771       - ${HOST_HOME}:${HOST_HOME}
772       - /etc/passwd:/etc/passwd:ro
773       - /etc/group:/etc/group:ro
774     working_dir: ${CORE_ROOT}/Build
775     command: >
776       /bin/sh -c "
777         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
778           set -x
779         fi
780         yarn install \
781           && cd .. \
782           && Build/node_modules/karma/bin/karma start \
783             vendor/typo3/testing-framework/Resources/Core/Build/Configuration/JSUnit/karma.conf.js --single-run
784       "
785
786   unitRandom:
787     image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
788     user: ${HOST_UID}
789     volumes:
790       - ${CORE_ROOT}:${CORE_ROOT}
791       - ${HOST_HOME}:${HOST_HOME}
792       - /etc/passwd:/etc/passwd:ro
793       - /etc/group:/etc/group:ro
794     working_dir: ${CORE_ROOT}
795     command: >
796       /bin/sh -c "
797         if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
798           set -x
799         fi
800         php -v | grep '^PHP'
801         if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
802           php -n -c /etc/php/cli-no-xdebug/php.ini \
803             vendor/phpunit/phpunit/phpunit-randomizer -c vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml ${EXTRA_TEST_OPTIONS} ${PHPUNIT_RANDOM} ${TEST_FILE};
804         else
805           DOCKER_HOST=`route -n | awk '/^0.0.0.0/ { print $$2 }'`
806           XDEBUG_CONFIG=\"remote_port=${PHP_XDEBUG_PORT} remote_enable=1 remote_host=$${DOCKER_HOST}\" \
807             vendor/phpunit/phpunit/phpunit-randomizer -c vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml ${EXTRA_TEST_OPTIONS} ${PHPUNIT_RANDOM} ${TEST_FILE};
808         fi
809       "