diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 715520b..3830694 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,6 +48,10 @@ jobs: - run: pnpm install --frozen-lockfile - run: pnpm test:unit:coverage + - name: Coverage summary + if: always() + run: bash scripts/coverage-summary.sh "Unit Test Coverage" coverage/unit/coverage-summary.json + - uses: actions/upload-artifact@v4 if: always() with: @@ -103,6 +107,10 @@ jobs: if: always() run: npx nyc report + - name: Coverage summary + if: always() + run: bash scripts/coverage-summary.sh "E2E Test Coverage" coverage/e2e/coverage-summary.json + - uses: actions/upload-artifact@v4 if: always() with: diff --git a/scripts/coverage-summary.sh b/scripts/coverage-summary.sh new file mode 100755 index 0000000..779d2e3 --- /dev/null +++ b/scripts/coverage-summary.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash +# Writes a coverage summary table to $GITHUB_STEP_SUMMARY (or stdout if not in CI). +# Usage: scripts/coverage-summary.sh