From d7a56e7352ba3169171fb745488d051a1bcf6be3 Mon Sep 17 00:00:00 2001 From: chan Date: Wed, 27 May 2026 13:48:56 +0900 Subject: [PATCH] fix(ci): use pnpm exec and shamefully-hoist to fix Playwright module resolution --- scripts/run_adminfront_ci_tests.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/run_adminfront_ci_tests.sh b/scripts/run_adminfront_ci_tests.sh index 5ef28400..4370bb26 100755 --- a/scripts/run_adminfront_ci_tests.sh +++ b/scripts/run_adminfront_ci_tests.sh @@ -201,7 +201,7 @@ set +e if ! command -v pnpm >/dev/null 2>&1; then run_with_retry 3 npm install -g pnpm fi - run_with_retry 3 CI=true pnpm install --no-frozen-lockfile --store-dir "$pnpm_store_dir" + run_with_retry 3 CI=true pnpm install --no-frozen-lockfile --shamefully-hoist --store-dir "$pnpm_store_dir" fi ) 2>&1 | tee reports/adminfront-install.log install_exit_code=${PIPESTATUS[0]} @@ -217,7 +217,7 @@ if [ "$install_exit_code" -ne 0 ]; then echo "- Exit Code: \`$install_exit_code\`" echo echo "## Command" - echo "\`cd adminfront && if [ \"$reuse_seed_node_modules\" -eq 0 ]; then if ! command -v pnpm >/dev/null 2>&1; then npm install -g pnpm; fi && pnpm install --no-frozen-lockfile --store-dir \"\$TMPDIR/pnpm-store\"; fi\`" + echo "\`cd adminfront && if [ \"$reuse_seed_node_modules\" -eq 0 ]; then if ! command -v pnpm >/dev/null 2>&1; then npm install -g pnpm; fi && pnpm install --no-frozen-lockfile --shamefully-hoist --store-dir \"\$TMPDIR/pnpm-store\"; fi\`" echo echo "## Install Log Tail (last 200 lines)" echo '```text' @@ -266,7 +266,7 @@ echo "==> adminfront using PORT=$port" ( cd "$tmp_dir/adminfront" PORT="$port" PLAYWRIGHT_WORKERS="${PLAYWRIGHT_WORKERS:-1}" \ - npx playwright test "${playwright_project_args[@]}" + pnpm exec playwright test "${playwright_project_args[@]}" ) 2>&1 | tee reports/adminfront-test.log test_exit_code=${PIPESTATUS[0]} set -e @@ -284,9 +284,9 @@ if [ "$test_exit_code" -ne 0 ]; then echo echo "## Commands" echo "1. \`cd adminfront\`" - echo "2. \`if [ \"$reuse_seed_node_modules\" -eq 0 ]; then if ! command -v pnpm >/dev/null 2>&1; then npm install -g pnpm; fi && pnpm install --no-frozen-lockfile --store-dir \"\$TMPDIR/pnpm-store\"; fi\`" + echo "2. \`if [ \"$reuse_seed_node_modules\" -eq 0 ]; then if ! command -v pnpm >/dev/null 2>&1; then npm install -g pnpm; fi && pnpm install --no-frozen-lockfile --shamefully-hoist --store-dir \"\$TMPDIR/pnpm-store\"; fi\`" echo "3. \`${playwright_install_desc}\`" - echo "4. \`npx playwright test\`" + echo "4. \`pnpm exec playwright test\`" echo echo "## Log Tail (last 200 lines)" echo '```text'