From e727e87f8baab9d9612024943543974f02726fcd Mon Sep 17 00:00:00 2001 From: Christian Fritsch Date: Wed, 27 May 2026 11:11:47 +0200 Subject: [PATCH 01/16] Update composer.json to remove symfony/yaml requirement Remove the version constraint for symfony/yaml. --- composer.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/composer.json b/composer.json index f3dbcda..d06c23a 100644 --- a/composer.json +++ b/composer.json @@ -16,8 +16,7 @@ ], "require": { "php": ">=7.2", - "drupal/coder": "^8.3", - "symfony/yaml": "^3.4" + "drupal/coder": "^8.3" }, "config": { "allow-plugins": { From 61e554194aedfab6f9de51a793b0f51aaf5b644b Mon Sep 17 00:00:00 2001 From: Christian Fritsch Date: Wed, 27 May 2026 11:14:36 +0200 Subject: [PATCH 02/16] Rename tests.yml to test.yml --- .github/workflows/{tests.yml => test.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{tests.yml => test.yml} (100%) diff --git a/.github/workflows/tests.yml b/.github/workflows/test.yml similarity index 100% rename from .github/workflows/tests.yml rename to .github/workflows/test.yml From e59a13c26678e87bed16c2535ce6198a7c886887 Mon Sep 17 00:00:00 2001 From: Christian Fritsch Date: Wed, 27 May 2026 11:16:07 +0200 Subject: [PATCH 03/16] Upgrade actions/cache from v1 to v4 Updated cache action version for composer and npm dependencies. --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8d96243..c22623e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,7 +44,7 @@ jobs: sudo /etc/init.d/mysql start - name: Cache composer dependencies - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.composer/cache key: ${{ runner.os }}-composer-cache-${{ hashFiles('**/composer.json') }} @@ -82,7 +82,7 @@ jobs: sudo /etc/init.d/mysql start - name: Cache composer dependencies - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.composer/cache key: ${{ runner.os }}-composer-cache-${{ hashFiles('**/composer.json') }} @@ -90,7 +90,7 @@ jobs: - name: Cache NPM dependencies id: npm-cache - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.npm key: ${{ runner.os }}-npm-cache From 9003c1940de9abb037d23d8987b92035dbc25ff6 Mon Sep 17 00:00:00 2001 From: Christian Fritsch Date: Wed, 27 May 2026 11:17:55 +0200 Subject: [PATCH 04/16] Upgrade upload and download artifact actions to v4 --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c22623e..9e89753 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -110,7 +110,7 @@ jobs: run: cd /tmp; tar cfz build.tgz test; mv build.tgz ${GITHUB_WORKSPACE} - name: Upload build - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: name: build path: build.tgz @@ -139,7 +139,7 @@ jobs: echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH - name: Download build - uses: actions/download-artifact@v1 + uses: actions/download-artifact@v4 with: name: build From 21668e5d1d4cac8d6c12094d590ab355cf7cb62d Mon Sep 17 00:00:00 2001 From: Christian Fritsch Date: Wed, 27 May 2026 11:20:55 +0200 Subject: [PATCH 05/16] Change PHP version to 8.3 and Drupal to 11.3 Updated PHP and Drupal versions for testing matrix. --- .github/workflows/test.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9e89753..7cafc31 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,11 +24,8 @@ jobs: RUN: [1, 2] include: - RUN: 1 - DRUPAL_TESTING_DRUPAL_VERSION: '~10.0' - PHP_VERSION: '8.1' - - RUN: 2 - DRUPAL_TESTING_DRUPAL_VERSION: '~10.0' - PHP_VERSION: '8.2' + DRUPAL_TESTING_DRUPAL_VERSION: '~11.3' + PHP_VERSION: '8.4' steps: - uses: actions/checkout@v1 @@ -74,7 +71,7 @@ jobs: - uses: shivammathur/setup-php@v2 with: coverage: none - php-version: '8.1' + php-version: '8.3' extensions: gd, pdo_mysql - name: Start MySql service @@ -126,7 +123,7 @@ jobs: - uses: shivammathur/setup-php@v2 with: coverage: none - php-version: '8.1' + php-version: '8.3' extensions: gd, pdo_mysql - name: Start MySql service From 99ee8155363b87d95b15823f7f4461042000b2d6 Mon Sep 17 00:00:00 2001 From: Christian Fritsch Date: Wed, 27 May 2026 11:23:25 +0200 Subject: [PATCH 06/16] Update Drupal version in test workflow --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7cafc31..470b219 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,7 @@ jobs: RUN: [1, 2] include: - RUN: 1 - DRUPAL_TESTING_DRUPAL_VERSION: '~11.3' + DRUPAL_TESTING_DRUPAL_VERSION: '~11.3.10' PHP_VERSION: '8.4' steps: From 6d39820e05be296635f711241d232d7a066cb5f7 Mon Sep 17 00:00:00 2001 From: Daniel Bosen Date: Tue, 2 Jun 2026 11:15:43 +0200 Subject: [PATCH 07/16] trying stuff --- .github/workflows/test.yml | 2 +- lib/stages/prepare_build.sh | 2 +- lib/stages/prepare_upgrade.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 470b219..7cafc31 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,7 @@ jobs: RUN: [1, 2] include: - RUN: 1 - DRUPAL_TESTING_DRUPAL_VERSION: '~11.3.10' + DRUPAL_TESTING_DRUPAL_VERSION: '~11.3' PHP_VERSION: '8.4' steps: diff --git a/lib/stages/prepare_build.sh b/lib/stages/prepare_build.sh index efe902e..26473da 100644 --- a/lib/stages/prepare_build.sh +++ b/lib/stages/prepare_build.sh @@ -61,7 +61,7 @@ _stage_prepare_build() { composer config extra.enable-patching true --working-dir="${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" # Use jq to find all dev dependencies of the project and add them to root composer file. - for dev_dependency in $(jq -r '.["require-dev"?] | keys[] as $k | "\($k):\(.[$k])"' "${DRUPAL_TESTING_PROJECT_BASEDIR}"/composer.json); do + for dev_dependency in $(jq -r '(.["require-dev"?] // {}) | keys[] as $k | "\($k):\(.[$k])"' "${DRUPAL_TESTING_PROJECT_BASEDIR}"/composer.json); do composer require "${dev_dependency}" --dev --no-update --working-dir="${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" done diff --git a/lib/stages/prepare_upgrade.sh b/lib/stages/prepare_upgrade.sh index 2534210..860d91b 100644 --- a/lib/stages/prepare_upgrade.sh +++ b/lib/stages/prepare_upgrade.sh @@ -39,7 +39,7 @@ _stage_prepare_upgrade() { # Set the path repository back to the project under test. composer config repositories.0 --json "{\"type\":\"path\", \"url\":\"${DRUPAL_TESTING_PROJECT_BASEDIR}\", \"options\":{\"symlink\": false}}" --working-dir="${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" # Use jq to find all dev dependencies of the project and add them to root composer file. - for dev_dependency in $(jq -r '.["require-dev"?] | keys[] as $k | "\($k):\(.[$k])"' "${DRUPAL_TESTING_PROJECT_BASEDIR}"/composer.json); do + for dev_dependency in $(jq -r '(.["require-dev"?] // {}) | keys[] as $k | "\($k):\(.[$k])"' "${DRUPAL_TESTING_PROJECT_BASEDIR}"/composer.json); do composer require "${dev_dependency}" --dev --no-update --working-dir="${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" done From 40b391d7b45aadeb7384ef060e2dc980e83ec61d Mon Sep 17 00:00:00 2001 From: Daniel Bosen Date: Tue, 2 Jun 2026 11:26:01 +0200 Subject: [PATCH 08/16] not so specificrecommended project version, another try to fix security advisory is blocking --- .claude/scheduled_tasks.lock | 1 + configuration.sh | 3 ++- lib/stages/prepare_build.sh | 3 +++ lib/stages/prepare_old_install.sh | 3 +++ 4 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .claude/scheduled_tasks.lock diff --git a/.claude/scheduled_tasks.lock b/.claude/scheduled_tasks.lock new file mode 100644 index 0000000..6155595 --- /dev/null +++ b/.claude/scheduled_tasks.lock @@ -0,0 +1 @@ +{"sessionId":"371a39ec-6f2e-4ace-a96f-51a48108a783","pid":41132,"procStart":"Tue Jun 2 08:51:45 2026","acquiredAt":1780392213432} \ No newline at end of file diff --git a/configuration.sh b/configuration.sh index fb1c52d..d94f9aa 100644 --- a/configuration.sh +++ b/configuration.sh @@ -13,7 +13,8 @@ DRUPAL_TESTING_COMPOSER_PROJECT=${DRUPAL_TESTING_COMPOSER_PROJECT:-"drupal/recom # The drupal version to test against. This can be any valid composer version string, but only drupal versions greater 8.6 # are supported. By default, we use the most recent stable version. -DRUPAL_TESTING_DRUPAL_VERSION=${DRUPAL_TESTING_DRUPAL_VERSION:-$(git ls-remote --tags --sort=-version:refname https://github.com/drupal/core.git | grep -E -o '[0-9]+\.[0-9]\.[0-9]+$' | head -n1)} +_drupal_latest_core=$(git ls-remote --tags --sort=-version:refname https://github.com/drupal/core.git | grep -E -o '[0-9]+\.[0-9]+\.[0-9]+$' | head -n1) +DRUPAL_TESTING_DRUPAL_VERSION=${DRUPAL_TESTING_DRUPAL_VERSION:-"~${_drupal_latest_core%.*}"} # The version of the composer project to use. DRUPAL_TESTING_COMPOSER_PROJECT_VERSION=${DRUPAL_TESTING_COMPOSER_PROJECT_VERSION:-${DRUPAL_TESTING_DRUPAL_VERSION}} diff --git a/lib/stages/prepare_build.sh b/lib/stages/prepare_build.sh index 26473da..e06caca 100644 --- a/lib/stages/prepare_build.sh +++ b/lib/stages/prepare_build.sh @@ -15,6 +15,9 @@ _stage_prepare_build() { # Build is based on drupal project composer create-project "${DRUPAL_TESTING_COMPOSER_PROJECT}":"${DRUPAL_TESTING_COMPOSER_PROJECT_VERSION}" "${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" --no-interaction --no-install + # Disable blocking on security advisories — this is a CI test environment, not production. + jq '.config.audit["block-insecure"] = false' "${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}/composer.json" | awk 'BEGIN{RS="";getline<"-";print>ARGV[1]}' "${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}/composer.json" + composer config "prefer-stable" true --working-dir="${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" if [[ ${DRUPAL_TESTING_PROJECT_TYPE} != "drupal-profile" ]]; then diff --git a/lib/stages/prepare_old_install.sh b/lib/stages/prepare_old_install.sh index 3d7bfce..34b5e2a 100644 --- a/lib/stages/prepare_old_install.sh +++ b/lib/stages/prepare_old_install.sh @@ -23,6 +23,9 @@ _stage_prepare_old_install() { # Build is based on drupal project composer create-project "${DRUPAL_TESTING_COMPOSER_PROJECT}":"${DRUPAL_TESTING_UPGRADE_COMPOSER_PROJECT_VERSION}" "${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" --no-interaction --no-install + # Disable blocking on security advisories — this is a CI test environment, not production. + jq '.config.audit["block-insecure"] = false' "${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}/composer.json" | awk 'BEGIN{RS="";getline<"-";print>ARGV[1]}' "${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}/composer.json" + composer config "prefer-stable" true --working-dir="${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" # Reorder repositories, to make sure, local path is first. From deb2243c32b9795ac9e9bc1e28fb37d49a1bc447 Mon Sep 17 00:00:00 2001 From: Daniel Bosen Date: Tue, 2 Jun 2026 11:38:33 +0200 Subject: [PATCH 09/16] newer chrome --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7cafc31..c945f6d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ env: DRUPAL_TESTING_DATABASE_USER: root DRUPAL_TESTING_DATABASE_PASSWORD: root DRUPAL_TESTING_DATABASE_ENGINE: mysql - DRUPAL_TESTING_SELENIUM_CHROME_VERSION: '105.0' + DRUPAL_TESTING_SELENIUM_CHROME_VERSION: 'latest' jobs: test-projects: @@ -139,6 +139,7 @@ jobs: uses: actions/download-artifact@v4 with: name: build + path: build - name: Unzip build artifact run: tar xCfz /tmp build/build.tgz test; rm -rf build From f4c30356eb88804b6206161f4b83464bf6a9e526 Mon Sep 17 00:00:00 2001 From: Daniel Bosen Date: Tue, 2 Jun 2026 11:43:11 +0200 Subject: [PATCH 10/16] drupal 11 compat --- tests/module/module.info.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/module/module.info.yml b/tests/module/module.info.yml index 883a6f1..932ebf7 100644 --- a/tests/module/module.info.yml +++ b/tests/module/module.info.yml @@ -2,4 +2,4 @@ name: Module type: module description: Drupal module with all sorts of tests, to test capabilities of the drupal-testing package. package: Drupal Testing -core_version_requirement: ^9 || ^10 +core_version_requirement: ^9 || ^10 || ^11 From 56ef4297bd301c1a2fe8fb97278a9191a73d623f Mon Sep 17 00:00:00 2001 From: Daniel Bosen Date: Tue, 2 Jun 2026 11:49:44 +0200 Subject: [PATCH 11/16] d11 stuff --- configuration.sh | 2 +- .../FunctionalJavascript/ModuleControllerTest.php | 6 ++++-- tests/module/tests/Unit/ModuleServiceTest.php | 15 ++++++--------- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/configuration.sh b/configuration.sh index d94f9aa..8bbbf81 100644 --- a/configuration.sh +++ b/configuration.sh @@ -191,7 +191,7 @@ export SYMFONY_DEPRECATIONS_HELPER=${SYMFONY_DEPRECATIONS_HELPER-weak} export SIMPLETEST_BASE_URL=${SIMPLETEST_BASE_URL:-http://${DRUPAL_TESTING_HTTP_HOST}:${DRUPAL_TESTING_HTTP_PORT}} # The driver args for webdriver. -export MINK_DRIVER_ARGS_WEBDRIVER=${MINK_DRIVER_ARGS_WEBDRIVER-"[\"chrome\", {\"chromeOptions\": {\"w3c\": false } }, \"http://${DRUPAL_TESTING_SELENIUM_HOST}:${DRUPAL_TESTING_SELENIUM_PORT}/wd/hub\"]"} +export MINK_DRIVER_ARGS_WEBDRIVER=${MINK_DRIVER_ARGS_WEBDRIVER-"[\"chrome\", {\"goog:chromeOptions\": {\"args\": [\"--headless\", \"--disable-gpu\", \"--no-sandbox\", \"--disable-dev-shm-usage\"]}}, \"http://${DRUPAL_TESTING_SELENIUM_HOST}:${DRUPAL_TESTING_SELENIUM_PORT}\"]"} # Increase composer memory limit. export COMPOSER_MEMORY_LIMIT=${COMPOSER_MEMORY_LIMIT:-"-1"} diff --git a/tests/module/tests/FunctionalJavascript/ModuleControllerTest.php b/tests/module/tests/FunctionalJavascript/ModuleControllerTest.php index 982965d..cf7f5ba 100644 --- a/tests/module/tests/FunctionalJavascript/ModuleControllerTest.php +++ b/tests/module/tests/FunctionalJavascript/ModuleControllerTest.php @@ -3,14 +3,16 @@ namespace Drupal\Tests\module\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses; /** * Class ModuleControllerTest. * * Javascript tests. - * - * @group module */ +#[Group('module')] +#[RunTestsInSeparateProcesses] class ModuleControllerTest extends WebDriverTestBase { /** diff --git a/tests/module/tests/Unit/ModuleServiceTest.php b/tests/module/tests/Unit/ModuleServiceTest.php index 03b6b08..d17a3b2 100644 --- a/tests/module/tests/Unit/ModuleServiceTest.php +++ b/tests/module/tests/Unit/ModuleServiceTest.php @@ -4,11 +4,12 @@ use Drupal\module\Service; use Drupal\Tests\UnitTestCase; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; -/** - * @coversDefaultClass \Drupal\module\Service - * @group module - */ +#[CoversClass(\Drupal\module\Service::class)] +#[Group('module')] class ModuleServiceTest extends UnitTestCase { /** * The entity permission provider. @@ -26,11 +27,7 @@ protected function setUp(): void { $this->service = new Service(); } - /** - * @covers ::serve - * - * @dataProvider numberProvider - */ + #[DataProvider('numberProvider')] public function testServe($number, $serving): void { $this->assertEquals($serving, $this->service->serve($number)); } From 18292346495ed09695f17637d5af14e50b36f216 Mon Sep 17 00:00:00 2001 From: Daniel Bosen Date: Tue, 2 Jun 2026 11:52:51 +0200 Subject: [PATCH 12/16] cs --- tests/module/tests/Unit/ModuleServiceTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/module/tests/Unit/ModuleServiceTest.php b/tests/module/tests/Unit/ModuleServiceTest.php index d17a3b2..27c5821 100644 --- a/tests/module/tests/Unit/ModuleServiceTest.php +++ b/tests/module/tests/Unit/ModuleServiceTest.php @@ -8,6 +8,9 @@ use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\Attributes\Group; +/** + * Tests for the Service class. + */ #[CoversClass(\Drupal\module\Service::class)] #[Group('module')] class ModuleServiceTest extends UnitTestCase { @@ -27,6 +30,9 @@ protected function setUp(): void { $this->service = new Service(); } + /** + * Tests the serve method. + */ #[DataProvider('numberProvider')] public function testServe($number, $serving): void { $this->assertEquals($serving, $this->service->serve($number)); From ce4481db6aae1f322758d47ac7eb6b7be024aa39 Mon Sep 17 00:00:00 2001 From: Daniel Bosen Date: Tue, 2 Jun 2026 11:59:26 +0200 Subject: [PATCH 13/16] static --- lib/stages/start_services.sh | 12 ++++++++++++ tests/module/tests/Unit/ModuleServiceTest.php | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/stages/start_services.sh b/lib/stages/start_services.sh index c454add..517e799 100644 --- a/lib/stages/start_services.sh +++ b/lib/stages/start_services.sh @@ -34,6 +34,18 @@ _stage_start_services() { fi wait_for_port "${DRUPAL_TESTING_SELENIUM_HOST}" "${DRUPAL_TESTING_SELENIUM_PORT}" + + # Wait for Selenium node to be ready to accept sessions (port open ≠ node registered). + local selenium_status_url="http://${DRUPAL_TESTING_SELENIUM_HOST}:${DRUPAL_TESTING_SELENIUM_PORT}/status" + local ready_count=0 + until curl -sf "${selenium_status_url}" | grep -q '"ready":true'; do + sleep 2 + ready_count=$((ready_count + 1)) + if [[ ${ready_count} -gt 15 ]]; then + printf "Error: Selenium node did not become ready in time.\n" 1>&2 + exit 1 + fi + done fi if ! port_is_open "${DRUPAL_TESTING_HTTP_HOST}" "${DRUPAL_TESTING_HTTP_PORT}"; then diff --git a/tests/module/tests/Unit/ModuleServiceTest.php b/tests/module/tests/Unit/ModuleServiceTest.php index 27c5821..73ff5c3 100644 --- a/tests/module/tests/Unit/ModuleServiceTest.php +++ b/tests/module/tests/Unit/ModuleServiceTest.php @@ -44,7 +44,7 @@ public function testServe($number, $serving): void { * @return array * A list of number and the servings they generate. */ - public function numberProvider(): array { + public static function numberProvider(): array { return [ [1, 'You have been served a 1'], ]; From 6f0c0299207fc71c4ef235f1057b090127fdb213 Mon Sep 17 00:00:00 2001 From: Daniel Bosen Date: Tue, 2 Jun 2026 12:19:18 +0200 Subject: [PATCH 14/16] selenium workarounds --- .github/workflows/test.yml | 1 + configuration.sh | 2 +- lib/stages/start_services.sh | 31 +++++++++++++++++-------------- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c945f6d..3a8f4f1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,6 +13,7 @@ env: DRUPAL_TESTING_DATABASE_PASSWORD: root DRUPAL_TESTING_DATABASE_ENGINE: mysql DRUPAL_TESTING_SELENIUM_CHROME_VERSION: 'latest' + DRUPAL_TESTING_USE_SELENIUM: 'false' jobs: test-projects: diff --git a/configuration.sh b/configuration.sh index 8bbbf81..1f00641 100644 --- a/configuration.sh +++ b/configuration.sh @@ -191,7 +191,7 @@ export SYMFONY_DEPRECATIONS_HELPER=${SYMFONY_DEPRECATIONS_HELPER-weak} export SIMPLETEST_BASE_URL=${SIMPLETEST_BASE_URL:-http://${DRUPAL_TESTING_HTTP_HOST}:${DRUPAL_TESTING_HTTP_PORT}} # The driver args for webdriver. -export MINK_DRIVER_ARGS_WEBDRIVER=${MINK_DRIVER_ARGS_WEBDRIVER-"[\"chrome\", {\"goog:chromeOptions\": {\"args\": [\"--headless\", \"--disable-gpu\", \"--no-sandbox\", \"--disable-dev-shm-usage\"]}}, \"http://${DRUPAL_TESTING_SELENIUM_HOST}:${DRUPAL_TESTING_SELENIUM_PORT}\"]"} +export MINK_DRIVER_ARGS_WEBDRIVER=${MINK_DRIVER_ARGS_WEBDRIVER-"[\"chrome\", {\"goog:chromeOptions\": {\"args\": [\"--headless\", \"--disable-gpu\", \"--no-sandbox\", \"--disable-dev-shm-usage\"]}}, \"http://${DRUPAL_TESTING_SELENIUM_HOST}:${DRUPAL_TESTING_SELENIUM_PORT}/wd/hub\"]"} # Increase composer memory limit. export COMPOSER_MEMORY_LIMIT=${COMPOSER_MEMORY_LIMIT:-"-1"} diff --git a/lib/stages/start_services.sh b/lib/stages/start_services.sh index 517e799..996bb2b 100644 --- a/lib/stages/start_services.sh +++ b/lib/stages/start_services.sh @@ -28,24 +28,27 @@ _stage_start_services() { if [ "${DRUPAL_TESTING_USE_SELENIUM}" = true ]; then docker run --detach --net host --name "${DRUPAL_TESTING_SELENIUM_DOCKER_NAME}" --volume "${DRUPAL_TESTING_PROJECT_BASEDIR}":/project --volume /dev/shm:/dev/shm selenium/standalone-chrome:"${DRUPAL_TESTING_SELENIUM_CHROME_VERSION}" + wait_for_port "${DRUPAL_TESTING_SELENIUM_HOST}" "${DRUPAL_TESTING_SELENIUM_PORT}" + # Wait for Selenium node to register — port open ≠ Chrome node ready. + local selenium_status_url="http://${DRUPAL_TESTING_SELENIUM_HOST}:${DRUPAL_TESTING_SELENIUM_PORT}/status" + local ready_count=0 + until curl -sf "${selenium_status_url}" | grep -q '"ready":true'; do + sleep 2 + ready_count=$((ready_count + 1)) + if [[ ${ready_count} -gt 15 ]]; then + printf "Error: Selenium node did not become ready in time.\n" 1>&2 + exit 1 + fi + done + elif command -v chromedriver > /dev/null 2>&1; then + # Use system ChromeDriver (pre-installed on GitHub Actions runners). + chromedriver --port="${DRUPAL_TESTING_SELENIUM_PORT}" --url-base=/wd/hub & + wait_for_port "${DRUPAL_TESTING_SELENIUM_HOST}" "${DRUPAL_TESTING_SELENIUM_PORT}" else download_chromedriver "${DRUPAL_TESTING_TEST_BASE_DIRECTORY}"/chromedriver --port="${DRUPAL_TESTING_SELENIUM_PORT}" --url-base=/wd/hub & + wait_for_port "${DRUPAL_TESTING_SELENIUM_HOST}" "${DRUPAL_TESTING_SELENIUM_PORT}" fi - - wait_for_port "${DRUPAL_TESTING_SELENIUM_HOST}" "${DRUPAL_TESTING_SELENIUM_PORT}" - - # Wait for Selenium node to be ready to accept sessions (port open ≠ node registered). - local selenium_status_url="http://${DRUPAL_TESTING_SELENIUM_HOST}:${DRUPAL_TESTING_SELENIUM_PORT}/status" - local ready_count=0 - until curl -sf "${selenium_status_url}" | grep -q '"ready":true'; do - sleep 2 - ready_count=$((ready_count + 1)) - if [[ ${ready_count} -gt 15 ]]; then - printf "Error: Selenium node did not become ready in time.\n" 1>&2 - exit 1 - fi - done fi if ! port_is_open "${DRUPAL_TESTING_HTTP_HOST}" "${DRUPAL_TESTING_HTTP_PORT}"; then From b0107a407a996a6b2a99f160ccfc92ea2a8a6b4b Mon Sep 17 00:00:00 2001 From: Daniel Bosen Date: Tue, 2 Jun 2026 12:23:50 +0200 Subject: [PATCH 15/16] cleanup --- .claude/scheduled_tasks.lock | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .claude/scheduled_tasks.lock diff --git a/.claude/scheduled_tasks.lock b/.claude/scheduled_tasks.lock deleted file mode 100644 index 6155595..0000000 --- a/.claude/scheduled_tasks.lock +++ /dev/null @@ -1 +0,0 @@ -{"sessionId":"371a39ec-6f2e-4ace-a96f-51a48108a783","pid":41132,"procStart":"Tue Jun 2 08:51:45 2026","acquiredAt":1780392213432} \ No newline at end of file From b1ad16a421db1e97abbcff343e447680411b209f Mon Sep 17 00:00:00 2001 From: Daniel Bosen Date: Tue, 2 Jun 2026 12:27:43 +0200 Subject: [PATCH 16/16] simplify --- lib/stages/prepare_build.sh | 3 +-- lib/stages/prepare_old_install.sh | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/stages/prepare_build.sh b/lib/stages/prepare_build.sh index e06caca..ab6bf34 100644 --- a/lib/stages/prepare_build.sh +++ b/lib/stages/prepare_build.sh @@ -16,8 +16,7 @@ _stage_prepare_build() { composer create-project "${DRUPAL_TESTING_COMPOSER_PROJECT}":"${DRUPAL_TESTING_COMPOSER_PROJECT_VERSION}" "${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" --no-interaction --no-install # Disable blocking on security advisories — this is a CI test environment, not production. - jq '.config.audit["block-insecure"] = false' "${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}/composer.json" | awk 'BEGIN{RS="";getline<"-";print>ARGV[1]}' "${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}/composer.json" - + composer config audit.block-insecure false --working-dir="${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" composer config "prefer-stable" true --working-dir="${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" if [[ ${DRUPAL_TESTING_PROJECT_TYPE} != "drupal-profile" ]]; then diff --git a/lib/stages/prepare_old_install.sh b/lib/stages/prepare_old_install.sh index 34b5e2a..b8d57a7 100644 --- a/lib/stages/prepare_old_install.sh +++ b/lib/stages/prepare_old_install.sh @@ -24,8 +24,7 @@ _stage_prepare_old_install() { composer create-project "${DRUPAL_TESTING_COMPOSER_PROJECT}":"${DRUPAL_TESTING_UPGRADE_COMPOSER_PROJECT_VERSION}" "${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" --no-interaction --no-install # Disable blocking on security advisories — this is a CI test environment, not production. - jq '.config.audit["block-insecure"] = false' "${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}/composer.json" | awk 'BEGIN{RS="";getline<"-";print>ARGV[1]}' "${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}/composer.json" - + composer config audit.block-insecure false --working-dir="${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" composer config "prefer-stable" true --working-dir="${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" # Reorder repositories, to make sure, local path is first.