forked from baron/baron-sso
코드체크 결과 README에 뱃지로 추가
This commit is contained in:
@@ -749,11 +749,11 @@ jobs:
|
||||
userfront-e2e/test-results
|
||||
if-no-files-found: ignore
|
||||
|
||||
front-vitest-coverage:
|
||||
adminfront-vitest-coverage:
|
||||
needs:
|
||||
- changes
|
||||
- lint
|
||||
if: ${{ always() && needs.changes.outputs.front_coverage == 'true' && (github.event_name != 'workflow_dispatch' || inputs.run_front_coverage == true) }}
|
||||
if: ${{ always() && needs.changes.outputs.adminfront == 'true' && (github.event_name != 'workflow_dispatch' || inputs.run_front_coverage == true) }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
@@ -777,10 +777,10 @@ jobs:
|
||||
|
||||
if [ "$install_exit_code" -ne 0 ]; then
|
||||
{
|
||||
echo "# Front Vitest Coverage Failure Report"
|
||||
echo "# Adminfront Vitest Coverage Failure Report"
|
||||
echo
|
||||
echo "- Workflow: \`${GITHUB_WORKFLOW:-Code Check}\`"
|
||||
echo "- Job: \`front-vitest-coverage\`"
|
||||
echo "- Job: \`adminfront-vitest-coverage\`"
|
||||
echo "- Reason: \`Dependency install failed\`"
|
||||
echo "- Exit Code: \`$install_exit_code\`"
|
||||
echo
|
||||
@@ -791,39 +791,37 @@ jobs:
|
||||
echo '```text'
|
||||
tail -n 200 reports/front-coverage-install.log
|
||||
echo '```'
|
||||
} > reports/front-vitest-coverage-failure-report.md
|
||||
} > reports/adminfront-vitest-coverage-failure-report.md
|
||||
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
|
||||
set +e
|
||||
cd adminfront
|
||||
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
|
||||
if [ "$app_install_exit_code" -ne 0 ]; then
|
||||
{
|
||||
echo "# Adminfront Vitest Coverage Failure Report"
|
||||
echo
|
||||
echo "- Workflow: \`${GITHUB_WORKFLOW:-Code Check}\`"
|
||||
echo "- Job: \`adminfront-vitest-coverage\`"
|
||||
echo "- Package: \`adminfront\`"
|
||||
echo "- Reason: \`Dependency install failed\`"
|
||||
echo "- Exit Code: \`$app_install_exit_code\`"
|
||||
echo
|
||||
echo "## Command"
|
||||
echo "\`cd adminfront && 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/adminfront-vitest-coverage-failure-report.md
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Run adminfront Vitest coverage
|
||||
run: |
|
||||
@@ -836,10 +834,10 @@ jobs:
|
||||
|
||||
if [ "$test_exit_code" -ne 0 ]; then
|
||||
{
|
||||
echo "# Front Vitest Coverage Failure Report"
|
||||
echo "# Adminfront Vitest Coverage Failure Report"
|
||||
echo
|
||||
echo "- Workflow: \`${GITHUB_WORKFLOW:-Code Check}\`"
|
||||
echo "- Job: \`front-vitest-coverage\`"
|
||||
echo "- Job: \`adminfront-vitest-coverage\`"
|
||||
echo "- Package: \`adminfront\`"
|
||||
echo "- Exit Code: \`$test_exit_code\`"
|
||||
echo
|
||||
@@ -847,7 +845,108 @@ jobs:
|
||||
echo '```text'
|
||||
tail -n 200 reports/adminfront-vitest-coverage.log
|
||||
echo '```'
|
||||
} > reports/front-vitest-coverage-failure-report.md
|
||||
} > reports/adminfront-vitest-coverage-failure-report.md
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Generate adminfront Vitest coverage summary
|
||||
run: |
|
||||
node scripts/summarize_vitest_coverage.mjs adminfront
|
||||
cat reports/vitest-coverage-summary.md >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
- name: Publish adminfront Vitest coverage failure summary
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
if [ -f reports/adminfront-vitest-coverage-failure-report.md ]; then
|
||||
cat reports/adminfront-vitest-coverage-failure-report.md >> "$GITHUB_STEP_SUMMARY"
|
||||
fi
|
||||
|
||||
- name: Upload adminfront Vitest coverage report artifact
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v3
|
||||
continue-on-error: true
|
||||
with:
|
||||
name: adminfront-vitest-coverage-report
|
||||
path: |
|
||||
reports/vitest-coverage-summary.md
|
||||
reports/vitest-coverage-summary.json
|
||||
reports/adminfront-vitest-coverage-failure-report.md
|
||||
reports/front-coverage-install.log
|
||||
reports/adminfront-vitest-coverage.log
|
||||
adminfront/coverage
|
||||
if-no-files-found: ignore
|
||||
|
||||
devfront-vitest-coverage:
|
||||
needs:
|
||||
- changes
|
||||
- lint
|
||||
if: ${{ always() && needs.changes.outputs.devfront == 'true' && (github.event_name != 'workflow_dispatch' || inputs.run_front_coverage == true) }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "24"
|
||||
|
||||
- name: Install front workspace dependencies
|
||||
run: |
|
||||
mkdir -p reports
|
||||
set +e
|
||||
npm install -g pnpm
|
||||
cd common
|
||||
pnpm install --no-frozen-lockfile --shamefully-hoist 2>&1 | tee ../reports/front-coverage-install.log
|
||||
install_exit_code=${PIPESTATUS[0]}
|
||||
cd ..
|
||||
set -e
|
||||
|
||||
if [ "$install_exit_code" -ne 0 ]; then
|
||||
{
|
||||
echo "# Devfront Vitest Coverage Failure Report"
|
||||
echo
|
||||
echo "- Workflow: \`${GITHUB_WORKFLOW:-Code Check}\`"
|
||||
echo "- Job: \`devfront-vitest-coverage\`"
|
||||
echo "- Reason: \`Dependency install failed\`"
|
||||
echo "- Exit Code: \`$install_exit_code\`"
|
||||
echo
|
||||
echo "## Command"
|
||||
echo "\`cd common && 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/devfront-vitest-coverage-failure-report.md
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set +e
|
||||
cd devfront
|
||||
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 "# Devfront Vitest Coverage Failure Report"
|
||||
echo
|
||||
echo "- Workflow: \`${GITHUB_WORKFLOW:-Code Check}\`"
|
||||
echo "- Job: \`devfront-vitest-coverage\`"
|
||||
echo "- Package: \`devfront\`"
|
||||
echo "- Reason: \`Dependency install failed\`"
|
||||
echo "- Exit Code: \`$app_install_exit_code\`"
|
||||
echo
|
||||
echo "## Command"
|
||||
echo "\`cd devfront && 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/devfront-vitest-coverage-failure-report.md
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -862,10 +961,10 @@ jobs:
|
||||
|
||||
if [ "$test_exit_code" -ne 0 ]; then
|
||||
{
|
||||
echo "# Front Vitest Coverage Failure Report"
|
||||
echo "# Devfront Vitest Coverage Failure Report"
|
||||
echo
|
||||
echo "- Workflow: \`${GITHUB_WORKFLOW:-Code Check}\`"
|
||||
echo "- Job: \`front-vitest-coverage\`"
|
||||
echo "- Job: \`devfront-vitest-coverage\`"
|
||||
echo "- Package: \`devfront\`"
|
||||
echo "- Exit Code: \`$test_exit_code\`"
|
||||
echo
|
||||
@@ -873,7 +972,108 @@ jobs:
|
||||
echo '```text'
|
||||
tail -n 200 reports/devfront-vitest-coverage.log
|
||||
echo '```'
|
||||
} > reports/front-vitest-coverage-failure-report.md
|
||||
} > reports/devfront-vitest-coverage-failure-report.md
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Generate devfront Vitest coverage summary
|
||||
run: |
|
||||
node scripts/summarize_vitest_coverage.mjs devfront
|
||||
cat reports/vitest-coverage-summary.md >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
- name: Publish devfront Vitest coverage failure summary
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
if [ -f reports/devfront-vitest-coverage-failure-report.md ]; then
|
||||
cat reports/devfront-vitest-coverage-failure-report.md >> "$GITHUB_STEP_SUMMARY"
|
||||
fi
|
||||
|
||||
- name: Upload devfront Vitest coverage report artifact
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v3
|
||||
continue-on-error: true
|
||||
with:
|
||||
name: devfront-vitest-coverage-report
|
||||
path: |
|
||||
reports/vitest-coverage-summary.md
|
||||
reports/vitest-coverage-summary.json
|
||||
reports/devfront-vitest-coverage-failure-report.md
|
||||
reports/front-coverage-install.log
|
||||
reports/devfront-vitest-coverage.log
|
||||
devfront/coverage
|
||||
if-no-files-found: ignore
|
||||
|
||||
orgfront-vitest-coverage:
|
||||
needs:
|
||||
- changes
|
||||
- lint
|
||||
if: ${{ always() && needs.changes.outputs.orgfront == 'true' && (github.event_name != 'workflow_dispatch' || inputs.run_front_coverage == true) }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "24"
|
||||
|
||||
- name: Install front workspace dependencies
|
||||
run: |
|
||||
mkdir -p reports
|
||||
set +e
|
||||
npm install -g pnpm
|
||||
cd common
|
||||
pnpm install --no-frozen-lockfile --shamefully-hoist 2>&1 | tee ../reports/front-coverage-install.log
|
||||
install_exit_code=${PIPESTATUS[0]}
|
||||
cd ..
|
||||
set -e
|
||||
|
||||
if [ "$install_exit_code" -ne 0 ]; then
|
||||
{
|
||||
echo "# Orgfront Vitest Coverage Failure Report"
|
||||
echo
|
||||
echo "- Workflow: \`${GITHUB_WORKFLOW:-Code Check}\`"
|
||||
echo "- Job: \`orgfront-vitest-coverage\`"
|
||||
echo "- Reason: \`Dependency install failed\`"
|
||||
echo "- Exit Code: \`$install_exit_code\`"
|
||||
echo
|
||||
echo "## Command"
|
||||
echo "\`cd common && 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/orgfront-vitest-coverage-failure-report.md
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set +e
|
||||
cd orgfront
|
||||
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 "# Orgfront Vitest Coverage Failure Report"
|
||||
echo
|
||||
echo "- Workflow: \`${GITHUB_WORKFLOW:-Code Check}\`"
|
||||
echo "- Job: \`orgfront-vitest-coverage\`"
|
||||
echo "- Package: \`orgfront\`"
|
||||
echo "- Reason: \`Dependency install failed\`"
|
||||
echo "- Exit Code: \`$app_install_exit_code\`"
|
||||
echo
|
||||
echo "## Command"
|
||||
echo "\`cd orgfront && 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/orgfront-vitest-coverage-failure-report.md
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -888,10 +1088,10 @@ jobs:
|
||||
|
||||
if [ "$test_exit_code" -ne 0 ]; then
|
||||
{
|
||||
echo "# Front Vitest Coverage Failure Report"
|
||||
echo "# Orgfront Vitest Coverage Failure Report"
|
||||
echo
|
||||
echo "- Workflow: \`${GITHUB_WORKFLOW:-Code Check}\`"
|
||||
echo "- Job: \`front-vitest-coverage\`"
|
||||
echo "- Job: \`orgfront-vitest-coverage\`"
|
||||
echo "- Package: \`orgfront\`"
|
||||
echo "- Exit Code: \`$test_exit_code\`"
|
||||
echo
|
||||
@@ -899,38 +1099,34 @@ jobs:
|
||||
echo '```text'
|
||||
tail -n 200 reports/orgfront-vitest-coverage.log
|
||||
echo '```'
|
||||
} > reports/front-vitest-coverage-failure-report.md
|
||||
} > reports/orgfront-vitest-coverage-failure-report.md
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Generate Vitest coverage summary
|
||||
- name: Generate orgfront Vitest coverage summary
|
||||
run: |
|
||||
node scripts/summarize_vitest_coverage.mjs
|
||||
node scripts/summarize_vitest_coverage.mjs orgfront
|
||||
cat reports/vitest-coverage-summary.md >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
- name: Publish front Vitest coverage failure summary
|
||||
- name: Publish orgfront Vitest coverage failure summary
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
if [ -f reports/front-vitest-coverage-failure-report.md ]; then
|
||||
cat reports/front-vitest-coverage-failure-report.md >> "$GITHUB_STEP_SUMMARY"
|
||||
if [ -f reports/orgfront-vitest-coverage-failure-report.md ]; then
|
||||
cat reports/orgfront-vitest-coverage-failure-report.md >> "$GITHUB_STEP_SUMMARY"
|
||||
fi
|
||||
|
||||
- name: Upload front Vitest coverage report artifact
|
||||
- name: Upload orgfront Vitest coverage report artifact
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v3
|
||||
continue-on-error: true
|
||||
with:
|
||||
name: front-vitest-coverage-report
|
||||
name: orgfront-vitest-coverage-report
|
||||
path: |
|
||||
reports/vitest-coverage-summary.md
|
||||
reports/vitest-coverage-summary.json
|
||||
reports/front-vitest-coverage-failure-report.md
|
||||
reports/orgfront-vitest-coverage-failure-report.md
|
||||
reports/front-coverage-install.log
|
||||
reports/adminfront-vitest-coverage.log
|
||||
reports/devfront-vitest-coverage.log
|
||||
reports/orgfront-vitest-coverage.log
|
||||
adminfront/coverage
|
||||
devfront/coverage
|
||||
orgfront/coverage
|
||||
if-no-files-found: ignore
|
||||
|
||||
@@ -1406,7 +1602,9 @@ jobs:
|
||||
- backend-tests
|
||||
- userfront-tests
|
||||
- userfront-e2e-tests
|
||||
- front-vitest-coverage
|
||||
- adminfront-vitest-coverage
|
||||
- devfront-vitest-coverage
|
||||
- orgfront-vitest-coverage
|
||||
- adminfront-tests
|
||||
- devfront-tests
|
||||
- orgfront-tests
|
||||
@@ -1423,12 +1621,26 @@ jobs:
|
||||
with:
|
||||
node-version: "24"
|
||||
|
||||
- name: Download Vitest coverage report artifact
|
||||
- name: Download adminfront Vitest coverage report artifact
|
||||
uses: actions/download-artifact@v3
|
||||
continue-on-error: true
|
||||
with:
|
||||
name: front-vitest-coverage-report
|
||||
path: badge-artifacts/front-vitest-coverage-report
|
||||
name: adminfront-vitest-coverage-report
|
||||
path: badge-artifacts/adminfront
|
||||
|
||||
- name: Download devfront Vitest coverage report artifact
|
||||
uses: actions/download-artifact@v3
|
||||
continue-on-error: true
|
||||
with:
|
||||
name: devfront-vitest-coverage-report
|
||||
path: badge-artifacts/devfront
|
||||
|
||||
- name: Download orgfront Vitest coverage report artifact
|
||||
uses: actions/download-artifact@v3
|
||||
continue-on-error: true
|
||||
with:
|
||||
name: orgfront-vitest-coverage-report
|
||||
path: badge-artifacts/orgfront
|
||||
|
||||
- name: Update badge files
|
||||
env:
|
||||
@@ -1438,7 +1650,9 @@ jobs:
|
||||
USERFRONT_RESULT: ${{ needs['userfront-tests'].result }}
|
||||
USERFRONT_E2E_RESULT: ${{ needs['userfront-e2e-tests'].result }}
|
||||
USERFRONT_E2E_FULL: ${{ github.event_name == 'workflow_dispatch' && inputs.run_userfront_e2e_full == true }}
|
||||
COVERAGE_RESULT: ${{ needs['front-vitest-coverage'].result }}
|
||||
ADMINFRONT_COVERAGE_RESULT: ${{ needs['adminfront-vitest-coverage'].result }}
|
||||
DEVFRONT_COVERAGE_RESULT: ${{ needs['devfront-vitest-coverage'].result }}
|
||||
ORGFRONT_COVERAGE_RESULT: ${{ needs['orgfront-vitest-coverage'].result }}
|
||||
ADMINFRONT_RESULT: ${{ needs['adminfront-tests'].result }}
|
||||
DEVFRONT_RESULT: ${{ needs['devfront-tests'].result }}
|
||||
ORGFRONT_RESULT: ${{ needs['orgfront-tests'].result }}
|
||||
|
||||
Reference in New Issue
Block a user