From 7dd94d39d1fb6ab5ccda781309807f4749d8f6fe Mon Sep 17 00:00:00 2001 From: TallblokeUK Date: Fri, 4 Sep 2026 00:10:34 +0100 Subject: [PATCH] ci: declare bash and read the project names from the environment --- .github/workflows/playwright-test.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/playwright-test.yml b/.github/workflows/playwright-test.yml index fc3a57dcc..71ac32f96 100644 --- a/.github/workflows/playwright-test.yml +++ b/.github/workflows/playwright-test.yml @@ -240,14 +240,18 @@ jobs: WP_E2E_WPCLI_URL: http://localhost:8888 WP_E2E_WP_CONTAINER: ${{ job.services.wordpress.id }} WP_E2E_MULTISITE_MODE: ${{ inputs.multisite }} + PLAYWRIGHT_PROJECTS: ${{ inputs.project-name }} + shell: bash run: | set -euo pipefail mkdir -p test-results/ci suffix="${{ inputs.project-name }}${{ inputs.multisite && '-multisite' || '' }}" : > "test-results/ci/playwright-${suffix}.log" # One --project flag per name, so several projects can be listed in the input. + # The names arrive through the environment rather than being pasted into + # the script, so no input value is ever interpreted as shell. project_args=() - for project in ${{ inputs.project-name }}; do + for project in $PLAYWRIGHT_PROJECTS; do project_args+=(--project "$project") done npm run test:playwright -- "${project_args[@]}" 2>&1 | tee -a "test-results/ci/playwright-${suffix}.log"