Skip to content

Commit 3da674c

Browse files
authored
[4.2] Drone: Parallelizing tasks (#37831)
merge on code review
1 parent 9ee1dd3 commit 3da674c

File tree

6 files changed

+76
-69
lines changed

6 files changed

+76
-69
lines changed

.drone.yml

Lines changed: 55 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ steps:
1313
commands:
1414
- composer validate --no-check-all --strict
1515
- composer install --no-progress --no-suggest
16-
- patch -N -p0 < tests/patch/phpunit8_php8_match.patch || echo "Ignore this error."
1716

1817
- name: phpcs
1918
image: joomlaprojects/docker-images:php7.2
@@ -163,9 +162,16 @@ steps:
163162
commands:
164163
- npm run lint:js
165164

165+
- name: prepare_codeception_tests
166+
depends_on:
167+
- npm
168+
image: joomlaprojects/docker-images:systemtests
169+
commands:
170+
- php libraries/vendor/bin/codecept build
171+
166172
- name: phpmin-api-mysql
167173
depends_on:
168-
- javascript-cs
174+
- prepare_codeception_tests
169175
image: joomlaprojects/docker-images:systemtests
170176
environment:
171177
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
@@ -194,8 +200,7 @@ steps:
194200

195201
- name: phpmin-api-postgres
196202
depends_on:
197-
# - phpnext-api-mysql
198-
- phpmin-api-mysql
203+
- prepare_codeception_tests
199204
image: joomlaprojects/docker-images:systemtests
200205
failure: ignore
201206
environment:
@@ -226,7 +231,7 @@ steps:
226231

227232
- name: phpmin-system-mysql
228233
depends_on:
229-
- javascript-cs
234+
- phpmax-api-mysql
230235
- phpmax-api-postgres
231236
image: joomlaprojects/docker-images:systemtests
232237
failure: ignore
@@ -235,16 +240,6 @@ steps:
235240
commands:
236241
- bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql
237242

238-
# - name: phpnext-system-mysql
239-
# depends_on:
240-
# - phpmin-system-mysql
241-
# image: joomlaprojects/docker-images:systemtests8.2
242-
# failure: ignore
243-
# environment:
244-
# JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
245-
# commands:
246-
# - bash tests/Codeception/drone-system-run.sh "$(pwd)" mysqlphpnext
247-
248243
- name: phpmax-system-mysql
249244
depends_on:
250245
# - phpnext-system-mysql
@@ -256,63 +251,75 @@ steps:
256251
commands:
257252
- bash tests/Codeception/drone-system-run.sh "$(pwd)" mysqlphpmax
258253

259-
# - name: phpnext-system-mysql8
260-
# depends_on:
261-
# - phpmax-system-mysql
262-
# image: joomlaprojects/docker-images:systemtests8.2
263-
# failure: ignore
264-
# environment:
265-
# JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
266-
# commands:
267-
# - bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql8phpnext
254+
# - name: phpnext-system-mysql
255+
# depends_on:
256+
# - phpmin-system-mysql
257+
# image: joomlaprojects/docker-images:systemtests8.2
258+
# failure: ignore
259+
# environment:
260+
# JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
261+
# commands:
262+
# - bash tests/Codeception/drone-system-run.sh "$(pwd)" mysqlphpnext
268263

269-
- name: phpmax-system-mysql8
264+
- name: phpmin-system-postgres
270265
depends_on:
271-
# - phpnext-system-mysql
272-
- phpmax-system-mysql
273-
image: joomlaprojects/docker-images:systemtests8.1
274-
failure: ignore
266+
- phpmax-api-mysql
267+
- phpmax-api-postgres
268+
image: joomlaprojects/docker-images:systemtests
275269
environment:
276270
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
277271
commands:
278-
- bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql8phpmax
279-
280-
# - name: phpnext-system-postgres
281-
# depends_on:
282-
# - phpmax-system-mysql8
283-
# image: joomlaprojects/docker-images:systemtests8.2
284-
# failure: ignore
285-
# environment:
286-
# JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
287-
# commands:
288-
# - bash tests/Codeception/drone-system-run.sh "$(pwd)" postgresphpnext
272+
- bash tests/Codeception/drone-system-run.sh "$(pwd)" postgres
289273

290274
- name: phpmax-system-postgres
291275
depends_on:
292-
# - phpnext-system-mysql8
293-
- phpmax-system-mysql8
276+
- phpmin-system-postgres
294277
image: joomlaprojects/docker-images:systemtests8.1
295278
failure: ignore
296279
environment:
297280
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
298281
commands:
299282
- bash tests/Codeception/drone-system-run.sh "$(pwd)" postgresphpmax
300283

284+
# - name: phpnext-system-postgres
285+
# depends_on:
286+
# - phpmax-system-mysql8
287+
# image: joomlaprojects/docker-images:systemtests8.2
288+
# failure: ignore
289+
# environment:
290+
# JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
291+
# commands:
292+
# - bash tests/Codeception/drone-system-run.sh "$(pwd)" postgresphpnext
293+
301294
- name: phpmin-system-mysql8
302-
depends_on: [ phpmax-system-postgres ]
295+
depends_on:
296+
- phpmax-api-mysql
297+
- phpmax-api-postgres
303298
image: joomlaprojects/docker-images:systemtests
304299
environment:
305300
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
306301
commands:
307302
- bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql8
308303

309-
- name: phpmin-system-postgres
310-
depends_on: [ phpmin-system-mysql8 ]
311-
image: joomlaprojects/docker-images:systemtests
304+
- name: phpmax-system-mysql8
305+
depends_on:
306+
- phpmin-system-mysql8
307+
image: joomlaprojects/docker-images:systemtests8.1
308+
failure: ignore
312309
environment:
313310
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
314311
commands:
315-
- bash tests/Codeception/drone-system-run.sh "$(pwd)" postgres
312+
- bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql8phpmax
313+
314+
# - name: phpnext-system-mysql8
315+
# depends_on:
316+
# - phpmax-system-mysql
317+
# image: joomlaprojects/docker-images:systemtests8.2
318+
# failure: ignore
319+
# environment:
320+
# JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
321+
# commands:
322+
# - bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql8phpnext
316323

317324
- name: artifacts-system-tests
318325
image: cschlosser/drone-ftps
@@ -350,9 +357,6 @@ steps:
350357
status:
351358
- failure
352359

353-
branches:
354-
exclude: [ l10n_* ]
355-
356360
volumes:
357361
- name: composer-cache
358362
host:
@@ -420,6 +424,6 @@ steps:
420424

421425
---
422426
kind: signature
423-
hmac: 24b9cf86c8dcb5efc6b7c0dfc7bd774410f81907d228eb63931224449953d9fe
427+
hmac: a97a38d569f1f6ee9edf79060905561e9017e73ff781d62d152cfe2a6887c046
424428

425429
...

tests/Codeception/acceptance.suite.dist.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ error_level: "E_ALL & ~E_STRICT & ~E_DEPRECATED"
4545

4646
env:
4747
postgres:
48+
paths:
49+
log: /drone/src/tests/Codeception/_output
4850
modules:
4951
config:
5052
Joomla\Browser\JoomlaBrowser:
@@ -57,6 +59,8 @@ env:
5759
dsn: 'pgsql:host=postgres;dbname=test_joomla'
5860
prefix: 'jos_'
5961
mysql8:
62+
paths:
63+
log: /drone/src/tests/Codeception/_output
6064
modules:
6165
config:
6266
Joomla\Browser\JoomlaBrowser:
@@ -67,6 +71,8 @@ env:
6771
Helper\JoomlaDb:
6872
prefix: 'jos_'
6973
mysql:
74+
paths:
75+
log: /drone/src/tests/Codeception/_output
7076
modules:
7177
config:
7278
Joomla\Browser\JoomlaBrowser:
@@ -76,6 +82,8 @@ env:
7682
Helper\JoomlaDb:
7783
prefix: 'jos_'
7884
postgresphpmax:
85+
paths:
86+
log: /drone/src/tests/Codeception/_output
7987
modules:
8088
config:
8189
Joomla\Browser\JoomlaBrowser:
@@ -88,6 +96,8 @@ env:
8896
dsn: 'pgsql:host=postgres;dbname=test_joomla'
8997
prefix: 'phpmax_'
9098
mysql8phpmax:
99+
paths:
100+
log: /drone/src/tests/Codeception/_output
91101
modules:
92102
config:
93103
Joomla\Browser\JoomlaBrowser:
@@ -98,6 +108,8 @@ env:
98108
Helper\JoomlaDb:
99109
prefix: 'phpmax_'
100110
mysqlphpmax:
111+
paths:
112+
log: /drone/src/tests/Codeception/_output
101113
modules:
102114
config:
103115
Joomla\Browser\JoomlaBrowser:
@@ -107,6 +119,8 @@ env:
107119
Helper\JoomlaDb:
108120
prefix: 'phpmax_'
109121
postgresphpnext:
122+
paths:
123+
log: /drone/src/tests/Codeception/_output
110124
modules:
111125
config:
112126
Joomla\Browser\JoomlaBrowser:
@@ -119,6 +133,8 @@ env:
119133
dsn: 'pgsql:host=postgres;dbname=test_joomla'
120134
prefix: 'phpnext_'
121135
mysql8phpnext:
136+
paths:
137+
log: /drone/src/tests/Codeception/_output
122138
modules:
123139
config:
124140
Joomla\Browser\JoomlaBrowser:
@@ -129,6 +145,8 @@ env:
129145
Helper\JoomlaDb:
130146
prefix: 'phpnext_'
131147
mysqlphpnext:
148+
paths:
149+
log: /drone/src/tests/Codeception/_output
132150
modules:
133151
config:
134152
Joomla\Browser\JoomlaBrowser:

tests/Codeception/drone-api-run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ echo "Waiting 6 seconds till Selenium is ready..."
2222
sleep 6
2323

2424
echo "[RUNNER] Run Codeception"
25-
php libraries/vendor/bin/codecept build
25+
cd /tests/www/$DB_ENGINE
2626
php libraries/vendor/bin/codecept run --fail-fast --steps --debug --env $DB_ENGINE tests/Codeception/acceptance/01-install/
2727

2828
# If you have found this line failing on OSX you need to brew install gnu-sed like we mentioned in the codeception readme!

tests/Codeception/drone-system-run.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ echo "Waiting 6 seconds till Selenium is ready..."
2929
sleep 6
3030

3131
echo "[RUNNER] Run Codeception"
32-
php libraries/vendor/bin/codecept build
33-
php libraries/vendor/bin/codecept run --fail-fast --steps --debug --env $DB_ENGINE tests/Codeception/acceptance/
32+
cd /tests/www/$DB_ENGINE
33+
php libraries/vendor/bin/codecept run acceptance --fail-fast --steps --debug --env $DB_ENGINE

tests/Codeception/exclude.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@
33
build
44
dev
55
node_modules
6-
tests
76
.appveyor.yml
87
.drone.yml
98
.editorconfig
109
.gitignore
1110
.php-cs-fixer.dist.php
1211
build.xml
13-
codeception.yml
1412
composer.json
1513
composer.lock
1614
crowdin.yml

tests/patch/phpunit8_php8_match.patch

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)