forked from baron/baron-sso
merge(ci): consolidate adminfront CI fixes with workspace-aware installation
This commit is contained in:
@@ -196,12 +196,17 @@ fi
|
||||
|
||||
set +e
|
||||
(
|
||||
cd "$tmp_dir/adminfront"
|
||||
# [Fix] Dependency resolution fails when installing from sub-app in isolated CI.
|
||||
# We must install from the workspace root (common) and ensure the workspace config
|
||||
# only points to available directories (adminfront & common).
|
||||
cd "$tmp_dir/common"
|
||||
echo "packages: ['.', '../adminfront']" > pnpm-workspace.yaml
|
||||
|
||||
if [ "$reuse_seed_node_modules" -eq 0 ]; then
|
||||
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 --shamefully-hoist --store-dir "$pnpm_store_dir"
|
||||
run_with_retry 3 env 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 +222,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 --shamefully-hoist --store-dir \"\$TMPDIR/pnpm-store\"; fi\`"
|
||||
echo "\`cd common && echo \"packages: ['.', '../adminfront']\" > pnpm-workspace.yaml && env CI=true pnpm install --no-frozen-lockfile --shamefully-hoist\`"
|
||||
echo
|
||||
echo "## Install Log Tail (last 200 lines)"
|
||||
echo '```text'
|
||||
@@ -246,7 +251,6 @@ if [ "$provision_exit_code" -ne 0 ]; then
|
||||
echo
|
||||
echo "## Command"
|
||||
echo "\`cd adminfront && ${playwright_install_desc}\`"
|
||||
echo
|
||||
echo "## Provision Log Tail (last 200 lines)"
|
||||
echo '```text'
|
||||
tail -n 200 reports/adminfront-provision.log
|
||||
@@ -283,10 +287,9 @@ if [ "$test_exit_code" -ne 0 ]; then
|
||||
echo "- Exit Code: \`$test_exit_code\`"
|
||||
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 --shamefully-hoist --store-dir \"\$TMPDIR/pnpm-store\"; fi\`"
|
||||
echo "3. \`${playwright_install_desc}\`"
|
||||
echo "4. \`pnpm exec playwright test\`"
|
||||
echo "1. \`cd common && echo \"packages: ['.', '../adminfront']\" > pnpm-workspace.yaml && env CI=true pnpm install --no-frozen-lockfile --shamefully-hoist\`"
|
||||
echo "2. \`${playwright_install_desc}\`"
|
||||
echo "3. \`pnpm exec playwright test\`"
|
||||
echo
|
||||
echo "## Log Tail (last 200 lines)"
|
||||
echo '```text'
|
||||
|
||||
Reference in New Issue
Block a user