Skip to content

Merge PR #140 with conflict resolution #4

Merge PR #140 with conflict resolution

Merge PR #140 with conflict resolution #4

Workflow file for this run

name: Code Coverage Gate
on:
push:
branches: [main, "release/*"]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
COVERAGE_LINES_THRESHOLD: 50
jobs:
coverage:
name: Test coverage threshold
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: latest
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run tests with coverage gate
run: pnpm test:coverage
- name: Upload coverage gate report
if: always()
uses: actions/upload-artifact@v4
with:
name: coverage-gate-report
path: coverage/coverage-gate.json
retention-days: 30
- name: Post coverage summary
if: always()
run: |
echo "## Code Coverage Gate" >> "$GITHUB_STEP_SUMMARY"
echo "" >> "$GITHUB_STEP_SUMMARY"
if [ -f coverage/coverage-gate.json ]; then
echo '```json' >> "$GITHUB_STEP_SUMMARY"
cat coverage/coverage-gate.json >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"
fi