docker-compose.yml 39.4 KB
Newer Older
1
2
3
version: '2.3'
services:
  chrome:
4
    image: ${DOCKER_SELENIUM_IMAGE}
5
6
    tmpfs:
      - /dev/shm:rw,nosuid,nodev,noexec,relatime
7

8
9
  mysql:
    image: mysql:${MYSQL_VERSION}
10
11
12
13
14
    environment:
      MYSQL_ROOT_PASSWORD: funcp
    tmpfs:
      - /var/lib/mysql/:rw,noexec,nosuid

15
16
  mariadb:
    image: mariadb:${MARIADB_VERSION}
17
18
19
20
21
    environment:
      MYSQL_ROOT_PASSWORD: funcp
    tmpfs:
      - /var/lib/mysql/:rw,noexec,nosuid

22
  postgres:
23
    image: postgres:${POSTGRES_VERSION}-alpine
24
25
    environment:
      POSTGRES_PASSWORD: funcp
26
      POSTGRES_USER: funcu
27
28
29
30
    tmpfs:
      - /var/lib/postgresql/data:rw,noexec,nosuid

  web:
31
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
32
    user: "${HOST_UID}"
33
34
35
    stop_grace_period: 1s
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
36
37
    extra_hosts:
      - "host.docker.internal:host-gateway"
38
39
40
41
42
43
44
45
    command: >
      /bin/sh -c "
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
          XDEBUG_MODE=\"off\" \
          php -S web:8000 -t ${CORE_ROOT}
        else
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
46
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
47
48
49
          php -S web:8000 -t ${CORE_ROOT}
        fi
      "
50
51
52
53
54
55
56

  redis4:
    image: redis:4-alpine

  memcached1-5:
    image: memcached:1.5-alpine

57
  acceptance_split:
58
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
59
    user: "${HOST_UID}"
60
61
62
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
Christian Kuhn's avatar
Christian Kuhn committed
63
    command: php -dxdebug.mode=off Build/Scripts/splitAcceptanceTests.php -v ${CHUNKS}
64

65
  prepare_acceptance_application_mariadb:
66
67
    image: alpine:3.8
    links:
68
      - mariadb
69
70
71
72
73
74
75
76
      - chrome
      - web
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        echo Waiting for database start...;
77
        while ! nc -z mariadb 3306; do
78
79
80
81
          sleep 1;
        done;
        echo Database is up;
      "
82
  acceptance_application_mariadb:
83
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
84
    user: "${HOST_UID}"
85
86
87
88
    environment:
      typo3DatabaseName: func_test
      typo3DatabaseUsername: root
      typo3DatabasePassword: funcp
89
      typo3DatabaseHost: mariadb
90
91
92
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
93
94
    extra_hosts:
      - "host.docker.internal:host-gateway"
95
96
97
98
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
99
100
101
102
        fi
        php -v | grep '^PHP'
        if [ ${CHUNKS} -gt 0 ]; then
          echo \"Running chunk ${THISCHUNK}\"
103
          COMMAND=\"bin/codecept run Application -d -g AcceptanceTests-Job-${THISCHUNK} -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} ${TEST_FILE} --xml reports.xml --html reports.html\"
104
        else
105
          COMMAND=\"bin/codecept run Application -d -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} ${TEST_FILE} --xml reports.xml --html reports.html\"
106
107
        fi
        mkdir -p typo3temp/var/tests/
108
109
110
111
112
113
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
          XDEBUG_MODE=\"off\" \
          $${COMMAND};
        else
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
114
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
115
116
          $${COMMAND};
        fi
117
118
      "

119
  prepare_acceptance_application_mysql:
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
    image: alpine:3.8
    links:
      - mysql
      - chrome
      - web
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        echo Waiting for database start...;
        while ! nc -z mysql 3306; do
          sleep 1;
        done;
        echo Database is up;
      "
136
  acceptance_application_mysql:
137
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
138
    user: "${HOST_UID}"
139
140
141
142
143
144
145
146
    environment:
      typo3DatabaseName: func_test
      typo3DatabaseUsername: root
      typo3DatabasePassword: funcp
      typo3DatabaseHost: mysql
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
147
148
    extra_hosts:
      - "host.docker.internal:host-gateway"
149
150
151
152
153
154
155
156
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        php -v | grep '^PHP'
        if [ ${CHUNKS} -gt 0 ]; then
          echo \"Running chunk ${THISCHUNK}\"
157
          COMMAND=\"bin/codecept run Application -d -g AcceptanceTests-Job-${THISCHUNK} -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} ${TEST_FILE} --xml reports.xml --html reports.html\"
158
        else
159
          COMMAND=\"bin/codecept run Application -d -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} ${TEST_FILE} --xml reports.xml --html reports.html\"
160
161
        fi
        mkdir -p typo3temp/var/tests/
162
163
164
165
166
167
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
          XDEBUG_MODE=\"off\" \
          $${COMMAND};
        else
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
168
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
169
170
          $${COMMAND};
        fi
171
172
      "

173
  prepare_acceptance_application_postgres:
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
    image: alpine:3.8
    links:
      - postgres
      - chrome
      - web
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        echo Waiting for database start...;
        while ! nc -z postgres 5432; do
          sleep 1;
        done;
        echo Database is up;
      "
190
  acceptance_application_postgres:
191
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
192
    user: "${HOST_UID}"
193
194
195
196
197
198
199
200
201
202
203
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    environment:
      typo3DatabaseDriver: pdo_pgsql
      typo3DatabaseName: bamboo
      typo3DatabaseUsername: funcu
      typo3DatabaseHost: postgres
      typo3DatabasePassword: funcp
      typo3TestingRedisHost: redis4
      typo3TestingMemcachedHost: memcached1-5
    working_dir: ${CORE_ROOT}
204
205
    extra_hosts:
      - "host.docker.internal:host-gateway"
206
207
208
209
210
211
212
213
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        php -v | grep '^PHP'
        if [ ${CHUNKS} -gt 0 ]; then
          echo \"Running chunk ${THISCHUNK}\"
214
          COMMAND=\"bin/codecept run Application -d -g AcceptanceTests-Job-${THISCHUNK} -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} ${TEST_FILE} --xml reports.xml --html reports.html\"
215
        else
216
          COMMAND=\"bin/codecept run Application -d -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} ${TEST_FILE} --xml reports.xml --html reports.html\"
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
        fi
        mkdir -p typo3temp/var/tests/
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
          XDEBUG_MODE=\"off\" \
          $${COMMAND};
        else
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
          $${COMMAND};
        fi
      "

  prepare_acceptance_application_sqlite:
    image: alpine:3.8
    links:
      - chrome
      - web
    command: >
      /bin/sh -c "
        sleep 1;
      "

  acceptance_application_sqlite:
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
    user: "${HOST_UID}"
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    extra_hosts:
      - "host.docker.internal:host-gateway"
    environment:
      typo3DatabaseDriver: pdo_sqlite
      typo3TestingRedisHost: redis4
      typo3TestingMemcachedHost: memcached1-5
252
253
254
255
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
256
        fi
257
258
259
        php -v | grep '^PHP'
        if [ ${CHUNKS} -gt 0 ]; then
          echo \"Running chunk ${THISCHUNK}\"
260
          COMMAND=\"bin/codecept run Application -d -g AcceptanceTests-Job-${THISCHUNK} -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} ${TEST_FILE} --xml reports.xml --html reports.html\"
261
        else
262
          COMMAND=\"bin/codecept run Application -d -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} ${TEST_FILE} --xml reports.xml --html reports.html\"
263
264
        fi
        mkdir -p typo3temp/var/tests/
265
266
267
268
269
270
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
          XDEBUG_MODE=\"off\" \
          $${COMMAND};
        else
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
271
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
272
273
          $${COMMAND};
        fi
274
275
      "

276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
  prepare_acceptance_install_mysql:
    image: alpine:3.8
    links:
      - mysql
      - chrome
      - web
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        echo Waiting for database start...;
        while ! nc -z mysql 3306; do
          sleep 1;
        done;
        echo Database is up;
      "
  acceptance_install_mysql:
294
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
295
    user: "${HOST_UID}"
296
297
298
299
300
301
302
303
    environment:
      typo3InstallMysqlDatabaseHost: mysql
      typo3InstallMysqlDatabaseName: func_test
      typo3InstallMysqlDatabaseUsername: root
      typo3InstallMysqlDatabasePassword: funcp
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
304
305
    extra_hosts:
      - "host.docker.internal:host-gateway"
306
307
308
309
310
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
311
312
313
        mkdir -p typo3temp/var/tests/
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
          XDEBUG_MODE=\"off\" \
314
          bin/codecept run Install -d -c typo3/sysext/core/Tests/codeception.yml --env=mysql --xml reports.xml --html reports.html
315
316
317
        else
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
318
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
319
          bin/codecept run Install -d -c typo3/sysext/core/Tests/codeception.yml --env=mysql --xml reports.xml --html reports.html
320
        fi
321
      "
322

323
  prepare_acceptance_install_mariadb:
324
325
    image: alpine:3.8
    links:
326
      - mariadb
327
328
329
330
331
332
333
334
      - chrome
      - web
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        echo Waiting for database start...;
335
        while ! nc -z mariadb 3306; do
336
337
338
339
          sleep 1;
        done;
        echo Database is up;
      "
340
  acceptance_install_mariadb:
341
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
342
    user: "${HOST_UID}"
343
    environment:
344
      typo3InstallMysqlDatabaseHost: mariadb
345
346
347
348
349
350
      typo3InstallMysqlDatabaseName: func_test
      typo3InstallMysqlDatabaseUsername: root
      typo3InstallMysqlDatabasePassword: funcp
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
351
352
    extra_hosts:
      - "host.docker.internal:host-gateway"
353
354
355
356
357
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
358
359
360
        mkdir -p typo3temp/var/tests/
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
          XDEBUG_MODE=\"off\" \
361
          bin/codecept run Install -d -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} --env=mysql --xml reports.xml --html reports.html
362
363
364
        else
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
365
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
366
          bin/codecept run Install -d -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} --env=mysql --xml reports.xml --html reports.html
367
        fi
368
369
      "

370
  prepare_acceptance_install_postgres:
371
372
    image: alpine:3.8
    links:
373
      - postgres
374
375
376
377
378
379
380
381
      - chrome
      - web
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        echo Waiting for database start...;
382
        while ! nc -z postgres 5432; do
383
384
385
386
          sleep 1;
        done;
        echo Database is up;
      "
387
  acceptance_install_postgres:
388
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
389
    user: "${HOST_UID}"
390
    environment:
391
      typo3InstallPostgresqlDatabaseHost: postgres
392
      typo3InstallPostgresqlDatabaseName: ${HOST_USER}
393
      typo3InstallPostgresqlDatabaseUsername: funcu
394
395
396
397
      typo3InstallPostgresqlDatabasePassword: funcp
    working_dir: ${CORE_ROOT}
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
398
399
    extra_hosts:
      - "host.docker.internal:host-gateway"
400
401
402
403
404
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
405
406
407
        mkdir -p typo3temp/var/tests/
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
          XDEBUG_MODE=\"off\" \
408
          bin/codecept run Install -d -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} --env=postgresql --xml reports.xml --html reports.html
409
410
411
        else
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
412
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
413
          bin/codecept run Install -d -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} --env=postgresql --xml reports.xml --html reports.html
414
        fi
415
416
417
418
419
420
421
422
423
424
425
426
      "

  prepare_acceptance_install_sqlite:
    image: alpine:3.8
    links:
      - chrome
      - web
    command: >
      /bin/sh -c "
        sleep 1;
      "
  acceptance_install_sqlite:
427
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
428
    user: "${HOST_UID}"
429
430
431
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
432
433
    extra_hosts:
      - "host.docker.internal:host-gateway"
434
435
436
437
438
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
439
440
441
        mkdir -p typo3temp/var/tests/
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
          XDEBUG_MODE=\"off\" \
442
          bin/codecept run Install -d -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} --env=sqlite --xml reports.xml --html reports.html
443
444
445
        else
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
446
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
447
          bin/codecept run Install -d -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} --env=sqlite --xml reports.xml --html reports.html
448
        fi
449
450
451
      "

  build_css:
452
    image: typo3/core-testing-js:latest
453
    user: "${HOST_UID}"
454
455
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
456
457
    environment:
      HOME: "${CORE_ROOT}/.cache"
458
459
460
461
462
463
    working_dir: ${CORE_ROOT}/Build
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
464
465
        mkdir -p ${CORE_ROOT}/.cache
        yarn install || exit 1
466
        node_modules/grunt/bin/grunt css
467
468
469
      "

  build_javascript:
470
    image: typo3/core-testing-js:latest
471
    user: "${HOST_UID}"
472
473
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
474
475
    environment:
      HOME: "${CORE_ROOT}/.cache"
476
477
478
479
480
481
    working_dir: ${CORE_ROOT}/Build
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
482
483
        mkdir -p ${CORE_ROOT}/.cache
        yarn install || exit 1
484
        node_modules/grunt/bin/grunt scripts
485
486
487
      "

  cgl_git:
488
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
489
    user: "${HOST_UID}"
490
491
492
493
494
495
496
497
498
499
500
501
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        Build/Scripts/cglFixMyCommit.sh ${CGLCHECK_DRY_RUN};
      "

  cgl_all:
502
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
503
    user: "${HOST_UID}"
504
505
506
507
508
509
510
511
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
Christian Kuhn's avatar
Christian Kuhn committed
512
        php -dxdebug.mode=off bin/php-cs-fixer fix -v ${CGLCHECK_DRY_RUN} --path-mode intersection \
513
          --config=Build/php-cs-fixer.php typo3/
514
515
516
      "

  check_annotations:
517
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
518
    user: "${HOST_UID}"
519
520
521
522
523
524
525
526
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
Christian Kuhn's avatar
Christian Kuhn committed
527
        php -dxdebug.mode=off Build/Scripts/annotationChecker.php;
528
529
      "

530
531
532
533
534
535
536
537
538
539
540
541
542
543
  check_test_methods_prefix:
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
    user: "${HOST_UID}"
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        php -dxdebug.mode=off Build/Scripts/testMethodPrefixChecker.php;
      "

544
  check_bom:
545
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
546
    user: "${HOST_UID}"
547
548
549
550
551
552
553
554
555
556
557
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        Build/Scripts/checkUtf8Bom.sh
      "

558
  check_composer:
559
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
560
    user: "${HOST_UID}"
561
562
563
564
565
566
567
568
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
Christian Kuhn's avatar
Christian Kuhn committed
569
        php -dxdebug.mode=off Build/Scripts/checkIntegrityComposer.php;
570
571
572
      "

  check_exception_codes:
573
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
574
    user: "${HOST_UID}"
575
576
577
578
579
580
581
582
583
584
585
586
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        Build/Scripts/duplicateExceptionCodeCheck.sh;
      "

  check_extension_scanner_rst:
587
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
588
    user: "${HOST_UID}"
589
590
591
592
593
594
595
596
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
Christian Kuhn's avatar
Christian Kuhn committed
597
        php -dxdebug.mode=off Build/Scripts/extensionScannerRstFileReferences.php;
598
599
600
      "

  check_file_path_length:
601
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
602
    user: "${HOST_UID}"
603
604
605
606
607
608
609
610
611
612
613
614
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        Build/Scripts/maxFilePathLength.sh;
      "

  check_git_submodule:
615
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
616
    user: "${HOST_UID}"
617
618
619
620
621
622
623
624
625
626
627
628
629
630
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        if [ `git submodule status 2>&1 | wc -l` -ne 0 ]; then
          echo \"Found a submodule definition in repository\";
          exit 1;
        fi
      "

631
  check_grunt_clean:
632
    image: typo3/core-testing-js:latest
633
    user: "${HOST_UID}"
634
635
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
636
637
    environment:
      HOME: "${CORE_ROOT}/.cache"
638
639
640
641
642
643
    working_dir: ${CORE_ROOT}/Build
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
644
645
        mkdir -p ${CORE_ROOT}/.cache
        yarn install || exit 1
646
647
648
649
650
651
652
        node_modules/grunt/bin/grunt build;
        cd ..;
        git add *;
        git status;
        git status | grep -q \"nothing to commit, working tree clean\"
      "

653
  check_permissions:
654
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
655
    user: "${HOST_UID}"
656
657
658
659
660
661
662
663
664
665
666
667
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        Build/Scripts/checkFilePermissions.sh;
      "

  check_rst:
668
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
669
    user: "${HOST_UID}"
670
671
672
673
674
675
676
677
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
Christian Kuhn's avatar
Christian Kuhn committed
678
        php -dxdebug.mode=off Build/Scripts/validateRstFiles.php;
679
680
681
      "

  composer_install:
682
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
683
    user: "${HOST_UID}"
684
685
686
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
687
688
    environment:
      COMPOSER_CACHE_DIR: ".cache/composer"
689
690
691
692
693
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
694
        composer install --no-progress --no-interaction;
695
696
      "

697
  composer_install_max:
698
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
699
    user: "${HOST_UID}"
700
701
702
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
703
704
    environment:
      COMPOSER_CACHE_DIR: ".cache/composer"
705
706
707
708
709
710
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        composer config --unset platform.php;
711
        composer update --no-progress --no-interaction;
712
713
714
715
        composer dumpautoload;
      "

  composer_install_min:
716
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
717
    user: "${HOST_UID}"
718
719
720
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
721
722
    environment:
      COMPOSER_CACHE_DIR: ".cache/composer"
723
724
725
726
727
728
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        composer config platform.php ${PHP_VERSION}.0;
729
        composer update --prefer-lowest --no-progress --no-interaction;
730
731
732
        composer dumpautoload;
      "

733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
  composer_test_distribution:
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
    user: "${HOST_UID}"
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    environment:
      COMPOSER_CACHE_DIR: .cache/composer
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        cd Build/composer
        rm -rf composer.json composer.lock public/index.php public/typo3 public/typo3conf/ext var/ vendor/;
        cp composer.dist.json composer.json;
        composer update --no-progress --no-interaction;
      "

752
  composer_validate:
753
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
754
    user: "${HOST_UID}"
755
756
757
758
759
760
761
762
763
764
765
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        composer validate;
      "

766
  functional_split:
767
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
768
    user: "${HOST_UID}"
769
770
771
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
772
773
774
775
776
    command: >
      /bin/sh -c "
        rm -rf Build/phpunit/FunctionalTests-Job-*.xml
        php -dxdebug.mode=off Build/Scripts/splitFunctionalTests.php -v ${CHUNKS}
      "
777

778
  prepare_functional_mariadb:
779
780
    image: alpine:3.8
    links:
781
      - mariadb
782
783
784
785
786
787
788
789
      - redis4
      - memcached1-5
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        echo Waiting for database start...;
790
        while ! nc -z mariadb 3306; do
791
792
793
794
          sleep 1;
        done;
        echo Database is up;
      "
795
  functional_mariadb:
796
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
797
    user: "${HOST_UID}"
798
799
800
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    environment:
801
      typo3DatabaseDriver: "${DATABASE_DRIVER}"
802
803
804
      typo3DatabaseName: func_test
      typo3DatabaseUsername: root
      typo3DatabasePassword: funcp
805
      typo3DatabaseHost: mariadb
806
807
808
      typo3TestingRedisHost: redis4
      typo3TestingMemcachedHost: memcached1-5
    working_dir: ${CORE_ROOT}
809
810
    extra_hosts:
      - "host.docker.internal:host-gateway"
811
812
813
814
815
816
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        php -v | grep '^PHP'
817
818
        if [ ${CHUNKS} -gt 0 ]; then
          echo \"Running chunk ${THISCHUNK}\"
819
          COMMAND=\"vendor/phpunit/phpunit/phpunit -c Build/phpunit/FunctionalTests-Job-${THISCHUNK}.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE}\"
820
        else
821
          COMMAND=\"vendor/phpunit/phpunit/phpunit -c Build/phpunit/FunctionalTests.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE}\"
822
        fi
823
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
Christian Kuhn's avatar
Christian Kuhn committed
824
          XDEBUG_MODE=\"off\" $${COMMAND};
825
        else
Christian Kuhn's avatar
Christian Kuhn committed
826
827
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
828
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
Christian Kuhn's avatar
Christian Kuhn committed
829
          $${COMMAND};
830
831
        fi
      "
832
833
834
835
836
837
838
839
840
841
842
843
844
845
  functional_deprecated_mariadb:
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
    user: "${HOST_UID}"
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    environment:
      typo3DatabaseDriver: "${DATABASE_DRIVER}"
      typo3DatabaseName: func_test
      typo3DatabaseUsername: root
      typo3DatabasePassword: funcp
      typo3DatabaseHost: mariadb
      typo3TestingRedisHost: redis4
      typo3TestingMemcachedHost: memcached1-5
    working_dir: ${CORE_ROOT}
846
847
    extra_hosts:
      - "host.docker.internal:host-gateway"
848
849
850
851
852
853
854
855
856
857
858
859
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        php -v | grep '^PHP'
        COMMAND=\"vendor/phpunit/phpunit/phpunit -c Build/phpunit/FunctionalTestsDeprecated.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE}\"
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
          XDEBUG_MODE=\"off\" $${COMMAND};
        else
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
860
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
861
862
863
          $${COMMAND};
        fi
      "
864

865
  prepare_functional_mysql:
866
867
    image: alpine:3.8
    links:
868
      - mysql
869
870
871
872
873
874
875
876
      - redis4
      - memcached1-5
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        echo Waiting for database start...;
877
        while ! nc -z mysql 3306; do
878
879
880
881
          sleep 1;
        done;
        echo Database is up;
      "
882
  functional_mysql:
883
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
884
    user: "${HOST_UID}"
885
886
887
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    environment:
888
      typo3DatabaseDriver: "${DATABASE_DRIVER}"
889
890
891
      typo3DatabaseName: func_test
      typo3DatabaseUsername: root
      typo3DatabasePassword: funcp
892
      typo3DatabaseHost: mysql
893
894
895
      typo3TestingRedisHost: redis4
      typo3TestingMemcachedHost: memcached1-5
    working_dir: ${CORE_ROOT}
896
897
    extra_hosts:
      - "host.docker.internal:host-gateway"
898
899
900
901
902
903
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        php -v | grep '^PHP'
904
905
        if [ ${CHUNKS} -gt 0 ]; then
          echo \"Running chunk ${THISCHUNK}\"
906
          COMMAND=\"vendor/phpunit/phpunit/phpunit -c Build/phpunit/FunctionalTests-Job-${THISCHUNK}.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE}\"
907
        else
908
          COMMAND=\"vendor/phpunit/phpunit/phpunit -c Build/phpunit/FunctionalTests.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE}\"
909
        fi
910
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
Christian Kuhn's avatar
Christian Kuhn committed
911
          XDEBUG_MODE=\"off\" $${COMMAND};
912
        else
Christian Kuhn's avatar
Christian Kuhn committed
913
914
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
915
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
Christian Kuhn's avatar
Christian Kuhn committed
916
          $${COMMAND};
917
918
        fi
      "
919
920
921
922
923
924
925
926
927
928
929
930
931
932
  functional_deprecated_mysql:
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
    user: "${HOST_UID}"
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    environment:
      typo3DatabaseDriver: "${DATABASE_DRIVER}"
      typo3DatabaseName: func_test
      typo3DatabaseUsername: root
      typo3DatabasePassword: funcp
      typo3DatabaseHost: mysql
      typo3TestingRedisHost: redis4
      typo3TestingMemcachedHost: memcached1-5
    working_dir: ${CORE_ROOT}
933
934
    extra_hosts:
      - "host.docker.internal:host-gateway"
935
936
937
938
939
940
941
942
943
944
945
946
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        php -v | grep '^PHP'
        COMMAND=\"vendor/phpunit/phpunit/phpunit -c Build/phpunit/FunctionalTestsDeprecated.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE}\"
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
          XDEBUG_MODE=\"off\" $${COMMAND};
        else
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
947
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
948
949
950
          $${COMMAND};
        fi
      "
951

952
  prepare_functional_postgres:
953
954
    image: alpine:3.8
    links:
955
      - postgres
956
957
958
959
960
961
962
963
      - redis4
      - memcached1-5
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        echo Waiting for database start...;
964
        while ! nc -z postgres 5432; do
965
966
967
968
          sleep 1;
        done;
        echo Database is up;
      "
969
  functional_postgres:
970
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
971
    user: "${HOST_UID}"
972
973
974
975
976
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    environment:
      typo3DatabaseDriver: pdo_pgsql
      typo3DatabaseName: bamboo
977
      typo3DatabaseUsername: funcu
978
      typo3DatabaseHost: postgres
979
980
981
982
      typo3DatabasePassword: funcp
      typo3TestingRedisHost: redis4
      typo3TestingMemcachedHost: memcached1-5
    working_dir: ${CORE_ROOT}
983
984
    extra_hosts:
      - "host.docker.internal:host-gateway"
985
986
987
988
989
990
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        php -v | grep '^PHP'
991
992
        if [ ${CHUNKS} -gt 0 ]; then
          echo \"Running chunk ${THISCHUNK}\"
993
          COMMAND=\"vendor/phpunit/phpunit/phpunit -c Build/phpunit/FunctionalTests-Job-${THISCHUNK}.xml ${EXTRA_TEST_OPTIONS} --exclude-group not-postgres ${TEST_FILE}\"
994
        else
995
          COMMAND=\"vendor/phpunit/phpunit/phpunit -c Build/phpunit/FunctionalTests.xml ${EXTRA_TEST_OPTIONS} --exclude-group not-postgres ${TEST_FILE}\"
996
        fi
997
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
Christian Kuhn's avatar
Christian Kuhn committed
998
          XDEBUG_MODE=\"off\" $${COMMAND};
999
        else
Christian Kuhn's avatar
Christian Kuhn committed
1000
1001
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
1002
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
Christian Kuhn's avatar
Christian Kuhn committed
1003
          $${COMMAND};
1004
1005
        fi
      "
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
  functional_deprecated_postgres:
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
    user: "${HOST_UID}"
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    environment:
      typo3DatabaseDriver: pdo_pgsql
      typo3DatabaseName: bamboo
      typo3DatabaseUsername: funcu
      typo3DatabaseHost: postgres
      typo3DatabasePassword: funcp
      typo3TestingRedisHost: redis4
      typo3TestingMemcachedHost: memcached1-5
    working_dir: ${CORE_ROOT}
1020
1021
    extra_hosts:
      - "host.docker.internal:host-gateway"
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        php -v | grep '^PHP'
        COMMAND=\"vendor/phpunit/phpunit/phpunit -c Build/phpunit/FunctionalTestsDeprecated.xml ${EXTRA_TEST_OPTIONS} --exclude-group not-postgres ${TEST_FILE}\"
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
          XDEBUG_MODE=\"off\" $${COMMAND};
        else
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
1034
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
1035
1036
1037
          $${COMMAND};
        fi
      "
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048

  prepare_functional_sqlite:
    image: alpine:3.8
    links:
      - redis4
      - memcached1-5
    command: >
      /bin/sh -c "
        sleep 1;
      "
  functional_sqlite:
1049
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
1050
    user: "${HOST_UID}"
1051
1052
    tmpfs:
      - ${CORE_ROOT}/typo3temp/var/tests/functional-sqlite-dbs/:rw,noexec,nosuid,uid=${HOST_UID}
1053
1054
1055
1056
1057
1058
1059
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    environment:
      typo3DatabaseDriver: pdo_sqlite
      typo3TestingRedisHost: redis4
      typo3TestingMemcachedHost: memcached1-5
    working_dir: ${CORE_ROOT}
1060
1061
    extra_hosts:
      - "host.docker.internal:host-gateway"
1062
1063
1064
1065
1066
1067
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        php -v | grep '^PHP'
1068
1069
        if [ ${CHUNKS} -gt 0 ]; then
          echo \"Running chunk ${THISCHUNK}\"
1070
          COMMAND=\"vendor/phpunit/phpunit/phpunit -c Build/phpunit/FunctionalTests-Job-${THISCHUNK}.xml ${EXTRA_TEST_OPTIONS} --exclude-group not-sqlite ${TEST_FILE}\"
1071
        else
1072
          COMMAND=\"vendor/phpunit/phpunit/phpunit -c Build/phpunit/FunctionalTests.xml ${EXTRA_TEST_OPTIONS} --exclude-group not-sqlite ${TEST_FILE}\"
1073
        fi
1074
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
Christian Kuhn's avatar
Christian Kuhn committed
1075
          XDEBUG_MODE=\"off\" $${COMMAND};
1076
        else
Christian Kuhn's avatar
Christian Kuhn committed
1077
1078
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
1079
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
Christian Kuhn's avatar
Christian Kuhn committed
1080
          $${COMMAND};
1081
1082
        fi
      "
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
  functional_deprecated_sqlite:
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
    user: "${HOST_UID}"
    tmpfs:
      - ${CORE_ROOT}/typo3temp/var/tests/functional-sqlite-dbs/:rw,noexec,nosuid,uid=${HOST_UID}
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    environment:
      typo3DatabaseDriver: pdo_sqlite
      typo3TestingRedisHost: redis4
      typo3TestingMemcachedHost: memcached1-5
    working_dir: ${CORE_ROOT}
1095
1096
    extra_hosts:
      - "host.docker.internal:host-gateway"
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        php -v | grep '^PHP'
        COMMAND=\"vendor/phpunit/phpunit/phpunit -c Build/phpunit/FunctionalTestsDeprecated.xml ${EXTRA_TEST_OPTIONS} --exclude-group not-sqlite ${TEST_FILE}\"
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
          XDEBUG_MODE=\"off\" $${COMMAND};
        else
          XDEBUG_MODE=\"debug,develop\" \
          XDEBUG_TRIGGER=\"foo\" \
1109
          XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal\" \
1110
1111
1112
          $${COMMAND};
        fi
      "
1113

1114
  lint_php:
1115
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
1116
    user: "${HOST_UID}"
1117
1118
1119
1120
1121
1122
1123
1124
1125
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        php -v | grep '^PHP'
Christian Kuhn's avatar
Christian Kuhn committed
1126
        find typo3/ -name \\*.php -print0 | xargs -0 -n1 -P4 php -dxdebug.mode=off -l >/dev/null
1127
1128
1129
      "

  lint_scss:
1130
    image: typo3/core-testing-js:latest
1131
    user: "${HOST_UID}"
1132
1133
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
1134
1135
    environment:
      HOME: "${CORE_ROOT}/.cache"
1136
1137
1138
1139
1140
1141
    working_dir: ${CORE_ROOT}/Build
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
1142
1143
        mkdir -p ${CORE_ROOT}/.cache
        yarn install || exit 1
1144
        node_modules/grunt/bin/grunt stylelint;
1145
1146
      "

1147
  lint_html:
1148
    image: typo3/core-testing-js:latest
1149
    user: "${HOST_UID}"
1150
1151
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
1152
1153
    environment:
      HOME: "${CORE_ROOT}/.cache"
1154
1155
1156
1157
1158
1159
    working_dir: ${CORE_ROOT}/Build
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
1160
1161
        mkdir -p ${CORE_ROOT}/.cache
        yarn install || exit 1
1162
        node_modules/grunt/bin/grunt lintspaces;
1163
1164
      "

1165
  lint_typescript:
1166
    image: typo3/core-testing-js:latest
1167
    user: "${HOST_UID}"
1168
1169
    volumes:
    - ${CORE_ROOT}:${CORE_ROOT}
1170
1171
    environment:
      HOME: "${CORE_ROOT}/.cache"
1172
1173
1174
1175
1176
1177
    working_dir: ${CORE_ROOT}/Build
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
1178
1179
        mkdir -p ${CORE_ROOT}/.cache
        yarn install || exit 1
1180
        node_modules/grunt/bin/grunt eslint;
1181
1182
      "

1183
1184
  list_exception_codes:
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
1185
    user: "${HOST_UID}"
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        Build/Scripts/duplicateExceptionCodeCheck.sh -p;
      "

1197
  phpstan:
1198
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
1199
    user: "${HOST_UID}"
1200
1201
1202
1203
1204
1205
1206
1207
1208
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        mkdir -p .cache
1209
        bin/phpstan analyse -c Build/phpstan/${PHPSTAN_CONFIG_FILE} --no-progress --no-interaction --memory-limit 4G ${TEST_FILE}
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
      "

  phpstan_generate_baseline:
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
    user: "${HOST_UID}"
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        mkdir -p .cache
1224
        bin/phpstan analyse -c Build/phpstan/${PHPSTAN_CONFIG_FILE} --no-progress --no-interaction --memory-limit 4G --generate-baseline=Build/phpstan/phpstan-baseline.neon
1225
1226
      "

1227
  unit:
1228
    image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
1229
    user: "${HOST_UID}"
1230
1231
1232
    volumes:
      - ${CORE_ROOT}:${CORE_ROOT}
    working_dir: ${CORE_ROOT}
1233
1234
    extra_hosts:
      - "host.docker.internal:host-gateway"
1235
1236
1237
1238
1239
1240
1241
    command: >
      /bin/sh -c "
        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
          set -x
        fi
        php -v | grep '^PHP'
        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
Christian Kuhn's avatar
Christian Kuhn committed
1242
          XDEBUG_MODE=\"off\" \
1243
          vendor/phpunit/phpunit/phpunit -c Build/phpunit/UnitTests.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE};
Christian Kuhn's avatar