1
0
forked from baron/baron-sso

fix(ci): use pnpm exec and shamefully-hoist to fix Playwright module resolution

This commit is contained in:
2026-05-27 13:48:56 +09:00
parent c7053c2c51
commit d7a56e7352

View File

@@ -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'