-
Notifications
You must be signed in to change notification settings - Fork 35
509 lines (494 loc) · 22.7 KB
/
acquia_cms_cron.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
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
name: "Acquia CMS CRON"
on:
schedule:
- cron: "0 0 * * *"
# Set ORCA related environment variables.
env:
# Provide your package's name.
ORCA_SUT_NAME: acquia/acquia_cms
ORCA_SUT_BRANCH: develop
ORCA_VERSION: ^4
ORCA_PACKAGES_CONFIG_ALTER: ../acquia_cms/tests/packages_alter.yml
ORCA_ENABLE_NIGHTWATCH: "FALSE"
ORCA_PHPCS_STANDARD: AcquiaPHP
ORCA_SUT_DIR: /home/runner/work/acquia_cms/acquia_cms
# Set Required API Keys.
CONNECTOR_ID: ${{ secrets.CONNECTOR_ID }}
SEARCH_UUID: ${{ secrets.SEARCH_UUID }}
CONNECTOR_KEY: ${{ secrets.CONNECTOR_KEY }}
GMAPS_KEY: ${{ secrets.GMAPS_KEY }}
SITESTUDIO_API_KEY: ${{ secrets.SITESTUDIO_API_KEY }}
SITESTUDIO_ORG_KEY: ${{ secrets.SITESTUDIO_ORG_KEY }}
#Add other required environment variables.
COMPOSER_PROCESS_TIMEOUT: 1800
CI: true
jobs:
static_code_analysis:
runs-on: ubuntu-latest
env:
ORCA_JOB: ${{ matrix.orca-job }}
GITHUB_EVENT: $ {{ github.event_name }}
JOB_TYPE: "static-code-analysis"
strategy:
matrix:
orca-job:
- STATIC_CODE_ANALYSIS
- STRICT_DEPRECATED_CODE_SCAN
#php-version: [ "8.1" ]
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- uses: shivammathur/setup-php@v2
with:
php-version: 8.3
#coverage: xdebug
- name: Download ORCA
run: |
composer self-update
composer create-project --no-dev --ignore-platform-req=php acquia/orca ../orca "$ORCA_VERSION" -n
curl https://gist.githubusercontent.com/rajeshreeputra/170586f217b422eb9cdfd9ca9457a2e3/raw/c2f277ba9005b91d7f662cacf37b3940a66a9b8c/sut-path-reposories.patch | git -C ../orca apply
- name: Before Install
run: |
# Added below in CI to test acquia_cms on Drupal Core >=9.5.
composer require "drupal/core:>=9.5" --no-update --no-install -d modules/acquia_cms_common
sed -i 's/^core_version_requirement.*/core_version_requirement: ">=9.5"/' modules/acquia_cms_common/acquia_cms_common.info.yml
../orca/bin/ci/before_install.sh
- name: Install
shell: 'script -q -e -c "bash {0}"'
run: ./tests/ci/install.sh
- name: Before script
run: ../orca/bin/ci/before_script.sh
- name: Script
run: ./tests/ci/script.sh
- name: Before Cache
run: ../orca/bin/ci/before_cache.sh
- name: After script
run: |
../orca/bin/ci/after_success.sh
../orca/bin/ci/after_failure.sh
../orca/bin/ci/after_script.sh
integrated_tests:
name: ${{ matrix.acms_job }} (${{ matrix.orca-job }})
runs-on: ubuntu-latest
env:
ORCA_JOB: ${{ matrix.orca-job }}
ACMS_JOB: ${{ matrix.acms_job }}
JOB_TYPE: "integrated-tests"
strategy:
fail-fast: false
matrix:
orca-job:
- INTEGRATED_TEST_ON_LATEST_LTS
acms_job:
- integrated_php_unit_tests
- integrated_existing_site_tests
- backstop_tests
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- uses: shivammathur/setup-php@v2
with:
php-version: 8.2
- name: Setup MySQL
run: |
sudo /etc/init.d/mysql start
mysql -uroot -proot < ./tests/ci/install.sql
- name: Download ORCA
run: |
composer self-update
composer create-project --no-dev --ignore-platform-req=php acquia/orca ../orca "$ORCA_VERSION" -n
curl https://gist.githubusercontent.com/rajeshreeputra/170586f217b422eb9cdfd9ca9457a2e3/raw/c2f277ba9005b91d7f662cacf37b3940a66a9b8c/sut-path-reposories.patch | git -C ../orca apply
curl https://gist.githubusercontent.com/vishalkhode1/342a0eee801e51f48b4d9701749c1c94/raw/orca-oldest-support.patch | git -C ../orca apply
- name: Before Install
run: |
# Added below in CI to test acquia_cms on Drupal Core >=9.5.
composer require "drupal/core:>=9.5" --no-update --no-install -d modules/acquia_cms_common
sed -i 's/^core_version_requirement.*/core_version_requirement: ">=9.5"/' modules/acquia_cms_common/acquia_cms_common.info.yml
# One of the patch is failing on Drupal Core 9.5. So remove that patch.
if [ "${ORCA_JOB}" = "INTEGRATED_TEST_ON_LATEST_LTS" ]; then
# Remove the failing php on Drupal Core 9.5.
# NEW_JSON=$(composer config extra.patches."drupal/core" | sed -r 's/,?"3328187.*3142.patch"//')
# Remove drupal/core patch as it's needed for latest Drupal Core only.
composer config extra.patches.drupal/core {} --json
sed -i 's/2598.patch",/2598.patch"/' modules/acquia_cms_common/composer.json
sed -i '/3356894-mr_3896.patch/d' modules/acquia_cms_common/composer.json
sed -i '/3370946-page-title-backport-10-2-2_0.patch/d' modules/acquia_cms_common/composer.json
fi
# Remove all PHPUnit tests from individual modules, except the integrated & ExistingSite tests.
if [ "${ACMS_JOB}" = "integrated_existing_site_tests" ]; then
find modules/*/tests tests -type f -name "*Test.php" ! -path "*/ExistingSite*/*" -exec rm -fr '{}' ';'
elif [ "${ACMS_JOB}" = "integrated_php_unit_tests" ]; then
# Remove all isolated/existing_site phpunit tests from acquia_cms modules.
find modules/*/tests -type f -name "*Test.php" -exec rm -fr '{}' ';'
# Remove all existing_site phpunit tests from acquia_cms repo as those get's covered from integrated_existing_site_tests.
find tests/src -type f -name "*Test.php" -path "*/ExistingSite*/*" -exec rm -fr '{}' ';'
fi
# Change requireSameDimensions to true in backstop settings.
if [ "${ACMS_JOB}" = "backstop_tests" ]; then
sed -i '54s/"requireSameDimensions": true/"requireSameDimensions": false/' tests/backstop/backstop-settings.js
sed -i '111s/"requireSameDimensions": true/"requireSameDimensions": false/' tests/backstop/backstop-settings.js
sed -i '130s/"requireSameDimensions": true/"requireSameDimensions": false/' tests/backstop/backstop-settings.js
sed -i '149s/"requireSameDimensions": true/"requireSameDimensions": false/' tests/backstop/backstop-settings.js
sed -i '168s/"requireSameDimensions": true/"requireSameDimensions": false/' tests/backstop/backstop-settings.js
sed -i '187s/"requireSameDimensions": true/"requireSameDimensions": false/' tests/backstop/backstop-settings.js
fi
../orca/bin/ci/before_install.sh
chromedriver --disable-dev-shm-usage --disable-extensions --disable-gpu --headless --no-sandbox --port=4444 &
CHROMEDRIVER_PID=$!
echo "CHROMEDRIVER_PID=${CHROMEDRIVER_PID}" >> ${GITHUB_ENV}
- name: Install
shell: 'script -q -e -c "bash {0}"'
run: ./tests/ci/install.sh
- name: Before script
run: ../orca/bin/ci/before_script.sh
- name: Script
run: ./tests/ci/script.sh
- name: Before Cache
run : ../orca/bin/ci/before_cache.sh
- name: After script
run: |
kill -0 ${{ env.CHROMEDRIVER_PID }}
../orca/bin/ci/after_success.sh
../orca/bin/ci/after_failure.sh
../orca/bin/ci/after_script.sh
isolated_tests:
name: acquia_cms (${{ matrix.orca-job }})
runs-on: ubuntu-latest
env:
# Set ORCA related environment variables.
ORCA_JOB: ${{ matrix.orca-job }}
# Set Required API Keys.
MODULES: ${{ matrix.modules }}
JOB_TYPE: "isolated-tests"
strategy:
fail-fast: false
matrix:
orca-job:
- ISOLATED_TEST_ON_CURRENT_DEV
- ISOLATED_TEST_ON_NEXT_MINOR_DEV
- INTEGRATED_TEST_ON_LATEST_LTS
php-version:
- 8.2
- 8.3
exclude:
- php-version: 8.3
orca-job: INTEGRATED_TEST_ON_LATEST_LTS
- php-version: 8.2
orca-job: [ ISOLATED_TEST_ON_CURRENT_DEV, ISOLATED_TEST_ON_NEXT_MINOR_DEV]
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
#coverage: xdebug
- name: Download ORCA
run: |
composer self-update
composer create-project --no-dev --ignore-platform-req=php acquia/orca ../orca "$ORCA_VERSION" -n
curl https://gist.githubusercontent.com/rajeshreeputra/170586f217b422eb9cdfd9ca9457a2e3/raw/c2f277ba9005b91d7f662cacf37b3940a66a9b8c/sut-path-reposories.patch | git -C ../orca apply
curl https://gist.githubusercontent.com/vishalkhode1/342a0eee801e51f48b4d9701749c1c94/raw/orca-oldest-support.patch | git -C ../orca apply
- name: Before Install
run: |
# Added below in CI to test acquia_cms on Drupal Core >=9.5.
composer require "drupal/core:>=9.5" --no-update --no-install -d modules/acquia_cms_common
sed -i 's/^core_version_requirement.*/core_version_requirement: ">=9.5"/' modules/acquia_cms_common/acquia_cms_common.info.yml
if [ "${ORCA_JOB}" = "INTEGRATED_TEST_ON_LATEST_LTS" ]; then
# NEW_JSON=$(composer config extra.patches."drupal/core" | sed -r 's/,?"3328187.*3142.patch"//')
# Remove drupal/core patch as it's needed for latest Drupal Core only.
composer config extra.patches.drupal/core {} --json
sed -i 's/2598.patch",/2598.patch"/' modules/acquia_cms_common/composer.json
sed -i '/3370946-page-title-backport-10-2-2_0.patch/d' modules/acquia_cms_common/composer.json
fi
# For Drupal 10.2.x i.e ISOLATED_TEST_ON_CURRENT_DEV, we are removing the patch.
# @todo: Update it accordingly in ticket ACMS-3598.
if [ "${ORCA_JOB}" = "ISOLATED_TEST_ON_CURRENT_DEV" ]; then
sed -i 's/2598.patch",/2598.patch"/' modules/acquia_cms_common/composer.json
sed -i '/3370946-page-title-backport-10-2-2_0.patch/d' modules/acquia_cms_common/composer.json
fi
# Do not run any existing site tests. We run them seperately.
find tests/src modules -type f -name "*Test.php" -path "*/ExistingSite*/*" -exec rm -fr '{}' ';'
../orca/bin/ci/before_install.sh
chromedriver --disable-dev-shm-usage --disable-extensions --disable-gpu --headless --no-sandbox --port=4444 &
CHROMEDRIVER_PID=$!
echo "CHROMEDRIVER_PID=${CHROMEDRIVER_PID}" >> ${GITHUB_ENV}
- name: Install
shell: 'script -q -e -c "bash {0}"'
run: ./tests/ci/install.sh
- name: Before script
run: ../orca/bin/ci/before_script.sh
- name: Script
run: ./tests/ci/script.sh
- name: Before Cache
run: ../orca/bin/ci/before_cache.sh
- name: After script
run: |
kill -0 ${{ env.CHROMEDRIVER_PID }}
../orca/bin/ci/after_success.sh
../orca/bin/ci/after_failure.sh
../orca/bin/ci/after_script.sh
blt_test:
name: "BLT site install"
runs-on: ubuntu-latest
env:
# Provide your package's name.
ACMS_JOB: "blt"
ORCA_SUT_NAME: acquia/acquia_cms
ORCA_SUT_BRANCH: develop
ORCA_PACKAGES_CONFIG_ALTER: ../acquia_cms/tests/packages_alter.yml
ORCA_FIXTURE_PROJECT_TEMPLATE: acquia/drupal-recommended-project
ORCA_ENABLE_NIGHTWATCH: "FALSE"
ORCA_PHPCS_STANDARD: AcquiaPHP
ORCA_SUT_DIR: /home/runner/work/acquia_cms/acquia_cms
COMPOSER_PROCESS_TIMEOUT: 1800
ORCA_JOB: ISOLATED_TEST_ON_CURRENT
# Set Required API Keys.
CONNECTOR_ID: ${{ secrets.CONNECTOR_ID }}
GMAPS_KEY: ${{ secrets.GMAPS_KEY }}
SEARCH_UUID: ${{ secrets.SEARCH_UUID }}
SITESTUDIO_API_KEY: ${{ secrets.SITESTUDIO_API_KEY }}
SITESTUDIO_ORG_KEY: ${{ secrets.SITESTUDIO_ORG_KEY }}
CI: true
UUID: "80f92d63-154b-4672-a6f3-831c97ad69da"
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- uses: shivammathur/setup-php@v2
with:
php-version: 8.3
- name: Setup MySQL
run: |
sudo /etc/init.d/mysql start
mysql -uroot -proot < ./tests/ci/install.sql
- name: Download ORCA
run: |
composer self-update
composer create-project --no-dev --ignore-platform-req=php acquia/orca ../orca "$ORCA_VERSION" -n
curl https://gist.githubusercontent.com/rajeshreeputra/170586f217b422eb9cdfd9ca9457a2e3/raw/c2f277ba9005b91d7f662cacf37b3940a66a9b8c/sut-path-reposories.patch | git -C ../orca apply
- name: Before Install
run: |
# Added below in CI to test acquia_cms on Drupal Core >=9.5.
composer require "drupal/core:>=9.5" --no-update --no-install -d modules/acquia_cms_common
sed -i 's/^core_version_requirement.*/core_version_requirement: ">=9.5"/' modules/acquia_cms_common/acquia_cms_common.info.yml
../orca/bin/ci/before_install.sh
- name: Install
shell: 'script -q -e -c "bash {0}"'
run: ./tests/ci/install.sh
- name: BLT Site Install
shell: 'script -q -e -c "bash {0}"'
run: ./tests/ci/blt_si.sh
- name: Before Cache
run: ../orca/bin/ci/before_cache.sh
- name: After script
run: |
../orca/bin/ci/after_success.sh
../orca/bin/ci/after_failure.sh
../orca/bin/ci/after_script.sh
cypress_tests:
name: Cypress Tests with ${{ matrix.orca-job }} on PHP ${{ matrix.php-version }}
runs-on: ubuntu-latest
env:
ORCA_SUT_NAME: acquia/acquia_cms
ORCA_SUT_BRANCH: develop
ORCA_PACKAGES_CONFIG_ALTER: ../acquia_cms/tests/packages_alter.yml
ORCA_FIXTURE_PROJECT_TEMPLATE: acquia/drupal-recommended-project
ORCA_ENABLE_NIGHTWATCH: "FALSE"
ORCA_PHPCS_STANDARD: AcquiaPHP
ORCA_SUT_DIR: /home/runner/work/acquia_cms/acquia_cms
COMPOSER_PROCESS_TIMEOUT: 1800
ORCA_JOB: ${{ matrix.orca-job }}
CONNECTOR_ID: ${{ secrets.CONNECTOR_ID }}
GMAPS_KEY: ${{ secrets.GMAPS_KEY }}
SEARCH_UUID: ${{ secrets.SEARCH_UUID }}
SITESTUDIO_API_KEY: ${{ secrets.SITESTUDIO_API_KEY }}
SITESTUDIO_ORG_KEY: ${{ secrets.SITESTUDIO_ORG_KEY }}
ACMS_JOB: "cypress_tests"
JOB_TYPE: "integrated-tests"
CI: true
strategy:
fail-fast: false
matrix:
orca-job:
- ISOLATED_TEST_ON_CURRENT
- INTEGRATED_TEST_ON_PREVIOUS_MINOR
php-version:
- 8.1
- 8.3
exclude:
- php-version: 8.3
orca-job: INTEGRATED_TEST_ON_PREVIOUS_MINOR
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
#coverage: xdebug
- name: Setup MySQL
run: |
sudo /etc/init.d/mysql start
mysql -uroot -proot < ./tests/ci/install.sql
- name: Download ORCA
run: |
composer self-update
composer create-project --no-dev --ignore-platform-req=php acquia/orca ../orca "$ORCA_VERSION" -n
curl https://gist.githubusercontent.com/rajeshreeputra/170586f217b422eb9cdfd9ca9457a2e3/raw/c2f277ba9005b91d7f662cacf37b3940a66a9b8c/sut-path-reposories.patch | git -C ../orca apply
curl https://gist.githubusercontent.com/vishalkhode1/342a0eee801e51f48b4d9701749c1c94/raw/orca-oldest-support.patch | git -C ../orca apply
- name: Before Install
run: |
# Added below in CI to test acquia_cms on Drupal Core >=9.5.
composer require "drupal/core:>=9.5" --no-update --no-install -d modules/acquia_cms_common
sed -i 's/^core_version_requirement.*/core_version_requirement: ">=9.5"/' modules/acquia_cms_common/acquia_cms_common.info.yml
# Remove all PHPunit tests from acquia_cms modules.
find modules/*/tests tests/src -type f -name "*Test.php" -exec rm -fr '{}' ';'
# Remove the failing php on Drupal Core 9.5.
if [ "${ORCA_JOB}" = "INTEGRATED_TEST_ON_LATEST_LTS" ]; then
# NEW_JSON=$(composer config extra.patches."drupal/core" | sed -r 's/,?"3328187.*3142.patch"//')
# Remove drupal/core patch as it's needed for latest Drupal Core only.
composer config extra.patches.drupal/core {} --json
sed -i 's/2598.patch",/2598.patch"/' modules/acquia_cms_common/composer.json
sed -i '/3356894-mr_3896.patch/d' modules/acquia_cms_common/composer.json
sed -i '/3370946-page-title-backport-10-2-2_0.patch/d' modules/acquia_cms_common/composer.json
# Change requireSameDimensions to true in backstop settings.
sed -i '54s/"requireSameDimensions": true/"requireSameDimensions": false/' tests/backstop/backstop-settings.js
sed -i '111s/"requireSameDimensions": true/"requireSameDimensions": false/' tests/backstop/backstop-settings.js
sed -i '130s/"requireSameDimensions": true/"requireSameDimensions": false/' tests/backstop/backstop-settings.js
sed -i '149s/"requireSameDimensions": true/"requireSameDimensions": false/' tests/backstop/backstop-settings.js
sed -i '168s/"requireSameDimensions": true/"requireSameDimensions": false/' tests/backstop/backstop-settings.js
sed -i '187s/"requireSameDimensions": true/"requireSameDimensions": false/' tests/backstop/backstop-settings.js
fi
if [ "${ORCA_JOB}" = "INTEGRATED_TEST_ON_PREVIOUS_MINOR" ]; then
# Update drupal/core patch as per Drupal Core version.
sed -i 's/2024-01-18\/3370946-page-title-backport-10-2-2_0.patch/2024-01-18\/3370946-page-title-backport-10-1-8.patch/g' modules/acquia_cms_common/composer.json
fi
../orca/bin/ci/before_install.sh
chromedriver --disable-dev-shm-usage --disable-extensions --disable-gpu --headless --no-sandbox --port=4444 &
CHROMEDRIVER_PID=$!
echo "CHROMEDRIVER_PID=${CHROMEDRIVER_PID}" >> ${GITHUB_ENV}
- name: Install
shell: 'script -q -e -c "bash {0}"'
run: ./tests/ci/install.sh
- name: Before script
run: ../orca/bin/ci/before_script.sh
- name: Script
run: ./tests/ci/script.sh
- name: Before Cache
run: ../orca/bin/ci/before_cache.sh
- name: After script
run: |
kill -0 ${{ env.CHROMEDRIVER_PID }}
../orca/bin/ci/after_success.sh
../orca/bin/ci/after_failure.sh
../orca/bin/ci/after_script.sh
dev_version_test:
name: ${{ matrix.acms_job }} (${{ matrix.modules }})
runs-on: ubuntu-latest
env:
ORCA_SUT_NAME: acquia/acquia_cms
ORCA_SUT_BRANCH: develop
ORCA_PACKAGES_CONFIG_ALTER: ../acquia_cms/tests/packages_alter.yml
ORCA_FIXTURE_PROJECT_TEMPLATE: acquia/drupal-recommended-project
ORCA_ENABLE_NIGHTWATCH: "FALSE"
ORCA_PHPCS_STANDARD: AcquiaPHP
ORCA_SUT_DIR: /home/runner/work/acquia_cms/acquia_cms
COMPOSER_PROCESS_TIMEOUT: 1800
ORCA_JOB: ${{ matrix.orca-job }}
CONNECTOR_ID: ${{ secrets.CONNECTOR_ID }}
SEARCH_UUID: ${{ secrets.SEARCH_UUID }}
CONNECTOR_KEY: ${{ secrets.CONNECTOR_KEY }}
GMAPS_KEY: ${{ secrets.GMAPS_KEY }}
SITESTUDIO_API_KEY: ${{ secrets.SITESTUDIO_API_KEY }}
SITESTUDIO_ORG_KEY: ${{ secrets.SITESTUDIO_ORG_KEY }}
ACMS_JOB: ${{ matrix.acms_job }}
JOB_TYPE: "integrated-tests"
MODULE: ${{ matrix.modules }}
CI: true
strategy:
fail-fast: false
matrix:
orca-job:
- ISOLATED_TEST_ON_CURRENT
acms_job:
- dev_version_test
modules:
- acquia_cms_article
- acquia_cms_audio
- acquia_cms_common
- acquia_cms_document
- acquia_cms_event
- acquia_cms_headless
- acquia_cms_image
- acquia_cms_page
- acquia_cms_person
- acquia_cms_place
- acquia_cms_search
- acquia_cms_site_studio
- acquia_cms_tour
- acquia_cms_video
- sitestudio_config_management
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- uses: shivammathur/setup-php@v2
with:
php-version: 8.3
- name: Setup MySQL
run: |
sudo /etc/init.d/mysql start
mysql -uroot -proot < ./tests/ci/install.sql
- name: Download ORCA
run: |
composer self-update
composer create-project --no-dev --ignore-platform-req=php acquia/orca ../orca "$ORCA_VERSION" -n
curl https://gist.githubusercontent.com/rajeshreeputra/170586f217b422eb9cdfd9ca9457a2e3/raw/c2f277ba9005b91d7f662cacf37b3940a66a9b8c/sut-path-reposories.patch | git -C ../orca apply
- name: Before Install
run: |
# Update the CI by altering modules requirement version.
sed -i 's/"drupal\/next": "^1.6"/"drupal\/next": "^1.0"/' modules/acquia_cms_headless/composer.json
sed -i 's/"drupal\/facets": "2.0.7"/"drupal\/facets": "^2.0.7"/' modules/acquia_cms_search/composer.json
sed -i 's/"drupal\/search_api": "1.30 || 1.31"/"drupal\/search_api": "^1.30"/' modules/acquia_cms_search/composer.json
# Remove all ExistingSite test in CI.
find tests/src -type f -name "*Test.php" -path "*/ExistingSite*/*" -exec rm -fr '{}' ';'
# Remove all PHPUnit test files, excluding the current module's PHPUnit tests.
find modules -type f -name "*Test.php" ! -path "*/${MODULE}/*" -exec rm -fr '{}' ';'
# Do not run any existing site tests. We run them seperately.
find modules -type d -name ExistingSite | xargs rm -rf && rm -rf tests/src/
../orca/bin/ci/before_install.sh
chromedriver --disable-dev-shm-usage --disable-extensions --disable-gpu --headless --no-sandbox --port=4444 &
CHROMEDRIVER_PID=$!
echo "CHROMEDRIVER_PID=${CHROMEDRIVER_PID}" >> ${GITHUB_ENV}
- name: Install
shell: 'script -q -e -c "bash {0}"'
run: ./tests/ci/install.sh
- name: Before script
run: ../orca/bin/ci/before_script.sh
- name: Script
run: ./tests/ci/script.sh
- name: Before Cache
run : ../orca/bin/ci/before_cache.sh
- name: After script
run: |
kill -0 ${{ env.CHROMEDRIVER_PID }}
../orca/bin/ci/after_success.sh
../orca/bin/ci/after_failure.sh
../orca/bin/ci/after_script.sh