forked from baron/baron-sso
ci: stabilize code check badge workflow
This commit is contained in:
@@ -102,34 +102,37 @@ jobs:
|
||||
run: |
|
||||
cd adminfront
|
||||
npx pnpm install -C ../common --no-frozen-lockfile
|
||||
npx pnpm install --no-frozen-lockfile
|
||||
|
||||
- name: Biome check adminfront (lint + format)
|
||||
run: |
|
||||
cd adminfront
|
||||
npx biome check . --formatter-enabled=false --organize-imports-enabled=false
|
||||
npx biome check . --linter-enabled=false --organize-imports-enabled=false
|
||||
npx biome check . --formatter-enabled=false --assist-enabled=false
|
||||
npx biome check . --linter-enabled=false --assist-enabled=false
|
||||
|
||||
- name: Install devfront dependencies
|
||||
run: |
|
||||
cd devfront
|
||||
npx pnpm install -C ../common --no-frozen-lockfile
|
||||
npx pnpm install --no-frozen-lockfile
|
||||
|
||||
- name: Biome check devfront (lint + format)
|
||||
run: |
|
||||
cd devfront
|
||||
npx biome check . --formatter-enabled=false --organize-imports-enabled=false
|
||||
npx biome check . --linter-enabled=false --organize-imports-enabled=false
|
||||
npx biome check . --formatter-enabled=false --assist-enabled=false
|
||||
npx biome check . --linter-enabled=false --assist-enabled=false
|
||||
|
||||
- name: Install orgfront dependencies
|
||||
run: |
|
||||
cd orgfront
|
||||
npx pnpm install -C ../common --no-frozen-lockfile
|
||||
npx pnpm install --no-frozen-lockfile
|
||||
|
||||
- name: Biome check orgfront (lint + format)
|
||||
run: |
|
||||
cd orgfront
|
||||
npx biome check . --formatter-enabled=false --organize-imports-enabled=false
|
||||
npx biome check . --linter-enabled=false --organize-imports-enabled=false
|
||||
npx biome check . --formatter-enabled=false --assist-enabled=false
|
||||
npx biome check . --linter-enabled=false --assist-enabled=false
|
||||
|
||||
- name: Lint Go backend
|
||||
run: |
|
||||
@@ -174,34 +177,37 @@ jobs:
|
||||
run: |
|
||||
cd adminfront
|
||||
npx pnpm install -C ../common --no-frozen-lockfile
|
||||
npx pnpm install --no-frozen-lockfile
|
||||
|
||||
- name: Biome check adminfront
|
||||
run: |
|
||||
cd adminfront
|
||||
npx biome check . --formatter-enabled=false --organize-imports-enabled=false
|
||||
npx biome check . --linter-enabled=false --organize-imports-enabled=false
|
||||
npx biome check . --formatter-enabled=false --assist-enabled=false
|
||||
npx biome check . --linter-enabled=false --assist-enabled=false
|
||||
|
||||
- name: Install devfront dependencies
|
||||
run: |
|
||||
cd devfront
|
||||
npx pnpm install -C ../common --no-frozen-lockfile
|
||||
npx pnpm install --no-frozen-lockfile
|
||||
|
||||
- name: Biome check devfront
|
||||
run: |
|
||||
cd devfront
|
||||
npx biome check . --formatter-enabled=false --organize-imports-enabled=false
|
||||
npx biome check . --linter-enabled=false --organize-imports-enabled=false
|
||||
npx biome check . --formatter-enabled=false --assist-enabled=false
|
||||
npx biome check . --linter-enabled=false --assist-enabled=false
|
||||
|
||||
- name: Install orgfront dependencies
|
||||
run: |
|
||||
cd orgfront
|
||||
npx pnpm install -C ../common --no-frozen-lockfile
|
||||
npx pnpm install --no-frozen-lockfile
|
||||
|
||||
- name: Biome check orgfront
|
||||
run: |
|
||||
cd orgfront
|
||||
npx biome check . --formatter-enabled=false --organize-imports-enabled=false
|
||||
npx biome check . --linter-enabled=false --organize-imports-enabled=false
|
||||
npx biome check . --formatter-enabled=false --assist-enabled=false
|
||||
npx biome check . --linter-enabled=false --assist-enabled=false
|
||||
|
||||
backend-tests:
|
||||
needs: lint
|
||||
@@ -669,6 +675,36 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for app in adminfront devfront orgfront; do
|
||||
set +e
|
||||
cd "$app"
|
||||
pnpm install --no-frozen-lockfile --shamefully-hoist 2>&1 | tee -a ../reports/front-coverage-install.log
|
||||
app_install_exit_code=${PIPESTATUS[0]}
|
||||
cd ..
|
||||
set -e
|
||||
|
||||
if [ "$app_install_exit_code" -ne 0 ]; then
|
||||
{
|
||||
echo "# Front Vitest Coverage Failure Report"
|
||||
echo
|
||||
echo "- Workflow: \`${GITHUB_WORKFLOW:-Code Check}\`"
|
||||
echo "- Job: \`front-vitest-coverage\`"
|
||||
echo "- Package: \`$app\`"
|
||||
echo "- Reason: \`Dependency install failed\`"
|
||||
echo "- Exit Code: \`$app_install_exit_code\`"
|
||||
echo
|
||||
echo "## Command"
|
||||
echo "\`cd $app && pnpm install --no-frozen-lockfile --shamefully-hoist\`"
|
||||
echo
|
||||
echo "## Install Log Tail (last 200 lines)"
|
||||
echo '```text'
|
||||
tail -n 200 reports/front-coverage-install.log
|
||||
echo '```'
|
||||
} > reports/front-vitest-coverage-failure-report.md
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Run adminfront Vitest coverage
|
||||
run: |
|
||||
set +e
|
||||
@@ -904,7 +940,10 @@ jobs:
|
||||
run: |
|
||||
mkdir -p ../reports
|
||||
set +e
|
||||
pnpm install -C ../common --no-frozen-lockfile 2>&1 | tee ../reports/devfront-install.log
|
||||
{
|
||||
pnpm install -C ../common --no-frozen-lockfile
|
||||
pnpm install --no-frozen-lockfile
|
||||
} 2>&1 | tee ../reports/devfront-install.log
|
||||
install_exit_code=${PIPESTATUS[0]}
|
||||
set -e
|
||||
|
||||
@@ -1082,7 +1121,10 @@ jobs:
|
||||
set +e
|
||||
cd orgfront
|
||||
npm install -g pnpm
|
||||
pnpm install -C ../common --no-frozen-lockfile 2>&1 | tee ../reports/orgfront-install.log
|
||||
{
|
||||
pnpm install -C ../common --no-frozen-lockfile
|
||||
pnpm install --no-frozen-lockfile
|
||||
} 2>&1 | tee ../reports/orgfront-install.log
|
||||
install_exit_code=${PIPESTATUS[0]}
|
||||
cd ..
|
||||
set -e
|
||||
|
||||
Reference in New Issue
Block a user