forked from baron/baron-sso
fix(ci): update github actions to properly support pnpm workspace
This commit is contained in:
@@ -57,11 +57,6 @@ jobs:
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "24"
|
||||
cache: "npm"
|
||||
cache-dependency-path: |
|
||||
adminfront/package-lock.json
|
||||
devfront/package-lock.json
|
||||
orgfront/package-lock.json
|
||||
|
||||
- name: i18n resource check
|
||||
run: |
|
||||
@@ -91,7 +86,8 @@ jobs:
|
||||
- name: Install adminfront dependencies
|
||||
run: |
|
||||
cd adminfront
|
||||
npm ci
|
||||
npm install -g pnpm
|
||||
pnpm install -C ../common
|
||||
|
||||
- name: Biome check adminfront (lint + format)
|
||||
run: |
|
||||
@@ -102,7 +98,8 @@ jobs:
|
||||
- name: Install devfront dependencies
|
||||
run: |
|
||||
cd devfront
|
||||
npm ci
|
||||
npm install -g pnpm
|
||||
pnpm install -C ../common
|
||||
|
||||
- name: Biome check devfront (lint + format)
|
||||
run: |
|
||||
@@ -113,7 +110,8 @@ jobs:
|
||||
- name: Install orgfront dependencies
|
||||
run: |
|
||||
cd orgfront
|
||||
npm ci
|
||||
npm install -g pnpm
|
||||
pnpm install -C ../common
|
||||
|
||||
- name: Biome check orgfront (lint + format)
|
||||
run: |
|
||||
@@ -561,8 +559,6 @@ jobs:
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "24"
|
||||
cache: "npm"
|
||||
cache-dependency-path: adminfront/package-lock.json
|
||||
|
||||
- name: Get Playwright version
|
||||
id: playwright-version
|
||||
@@ -656,8 +652,6 @@ jobs:
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "24"
|
||||
cache: "npm"
|
||||
cache-dependency-path: devfront/package-lock.json
|
||||
|
||||
- name: Get Playwright version
|
||||
id: playwright-version
|
||||
@@ -679,7 +673,8 @@ jobs:
|
||||
mkdir -p reports
|
||||
set +e
|
||||
cd devfront
|
||||
npm ci 2>&1 | tee ../reports/devfront-install.log
|
||||
npm install -g pnpm
|
||||
pnpm install -C ../common 2>&1 | tee ../reports/devfront-install.log
|
||||
install_exit_code=${PIPESTATUS[0]}
|
||||
cd ..
|
||||
set -e
|
||||
@@ -839,8 +834,6 @@ jobs:
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "24"
|
||||
cache: "npm"
|
||||
cache-dependency-path: orgfront/package-lock.json
|
||||
|
||||
- name: Get Playwright version
|
||||
id: playwright-version
|
||||
@@ -862,7 +855,8 @@ jobs:
|
||||
mkdir -p reports
|
||||
set +e
|
||||
cd orgfront
|
||||
npm ci 2>&1 | tee ../reports/orgfront-install.log
|
||||
npm install -g pnpm
|
||||
pnpm install -C ../common 2>&1 | tee ../reports/orgfront-install.log
|
||||
install_exit_code=${PIPESTATUS[0]}
|
||||
cd ..
|
||||
set -e
|
||||
|
||||
@@ -61,7 +61,7 @@ ensure_frontend_dependencies() {
|
||||
echo "Installing frontend dependencies..."
|
||||
if [ "$WORKSPACE_DIR" = "/common" ]; then
|
||||
|
||||
(cd /common && rm -rf node_modules .pnpm-store pnpm-lock.yaml pnpm-workspace.yaml && npm install --no-fund --no-audit)
|
||||
(cd /common && rm -rf node_modules .pnpm-store package-lock.json && npm install --no-workspaces --no-fund --no-audit)
|
||||
else
|
||||
npm ci
|
||||
fi
|
||||
|
||||
@@ -61,7 +61,7 @@ ensure_frontend_dependencies() {
|
||||
echo "Installing frontend dependencies..."
|
||||
if [ "$WORKSPACE_DIR" = "/common" ]; then
|
||||
|
||||
(cd /common && rm -rf node_modules .pnpm-store pnpm-lock.yaml pnpm-workspace.yaml && npm install --no-fund --no-audit)
|
||||
(cd /common && rm -rf node_modules .pnpm-store package-lock.json && npm install --no-workspaces --no-fund --no-audit)
|
||||
else
|
||||
npm ci
|
||||
fi
|
||||
|
||||
@@ -61,7 +61,7 @@ ensure_frontend_dependencies() {
|
||||
echo "Installing frontend dependencies..."
|
||||
if [ "$WORKSPACE_DIR" = "/common" ]; then
|
||||
|
||||
(cd /common && rm -rf node_modules .pnpm-store pnpm-lock.yaml pnpm-workspace.yaml && npm install --no-fund --no-audit)
|
||||
(cd /common && rm -rf node_modules .pnpm-store package-lock.json && npm install --no-workspaces --no-fund --no-audit)
|
||||
else
|
||||
npm ci
|
||||
fi
|
||||
|
||||
@@ -133,7 +133,7 @@ fi
|
||||
set +e
|
||||
(
|
||||
cd "$tmp_dir/adminfront"
|
||||
npm ci --ignore-scripts
|
||||
npm install -g pnpm && pnpm install -C ../common
|
||||
) 2>&1 | tee reports/adminfront-install.log
|
||||
install_exit_code=${PIPESTATUS[0]}
|
||||
set -e
|
||||
@@ -148,7 +148,7 @@ if [ "$install_exit_code" -ne 0 ]; then
|
||||
echo "- Exit Code: \`$install_exit_code\`"
|
||||
echo
|
||||
echo "## Command"
|
||||
echo "\`cd adminfront && npm ci --ignore-scripts\`"
|
||||
echo "\`cd adminfront && npm install -g pnpm && pnpm install -C ../common\`"
|
||||
echo
|
||||
echo "## Install Log Tail (last 200 lines)"
|
||||
echo '```text'
|
||||
@@ -215,7 +215,7 @@ if [ "$test_exit_code" -ne 0 ]; then
|
||||
echo
|
||||
echo "## Commands"
|
||||
echo "1. \`cd adminfront\`"
|
||||
echo "2. \`npm ci --ignore-scripts\`"
|
||||
echo "2. \`npm install -g pnpm && pnpm install -C ../common\`"
|
||||
echo "3. \`${playwright_install_desc}\`"
|
||||
echo "4. \`node ./node_modules/playwright/cli.js test\`"
|
||||
echo
|
||||
|
||||
Reference in New Issue
Block a user