Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .claudesync/reusable-gha-pr-unit-test-coverage-gate.project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"project_name": "reusable-gha-pr-unit-test-coverage-gate",
"project_description": "Reusable github actions for unit test coverage gate with PR workflow",
"includes": [
"tools",
".github",
"jest.config.ts",
"package.json",
"tsconfig.json"
],
"excludes": [],
"use_ignore_files": true,
"push_roots": []
}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
.idea
**/node_modules
/githubCommentsForPR.txt


# claude ai
.venv
.claudeignore
.claudesync/*.project_id.json
.claudesync/active_project.json
22 changes: 22 additions & 0 deletions tools/Reusable GHA PR Workflow for Coverage Gate(Unit Test).md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
⛰ Purpose & Impact

Implement automated Jest test coverage quality gates in our PR pipeline to prevent non standard code from being merged, reducing production incidents and improving developer productivity.



🔬 Problem Hypothesis: Frontend developers lack visibility into test coverage adequacy when submitting PRs, causing uncertainty about code quality and anxiety during deployments.



⚡️Risk of not implementing: Inconsistent code quality standards, and accumulating technical debt that will slow future development.



Solution Sketch: GitHub Actions workflow that runs Jest coverage on affected Nx monorepo projects, enforcing configurable thresholds (80% lines/statements, 75% functions, 70% branches) and blocking PRs that don't meet standards.

[PR Pipeline] → [Run Jest Tests] → [Check Coverage Thresholds] → [Pass/Fail PR]
🎯 Measuring Success: Test coverage: 80% line coverage across frontend projects

Sonarqube incidents: 30% reduction over 6 months

Developer satisfaction: 20% improvement in quality process satisfaction scores