diff --git a/.claudesync/reusable-gha-pr-unit-test-coverage-gate.project.json b/.claudesync/reusable-gha-pr-unit-test-coverage-gate.project.json new file mode 100644 index 00000000..fcb65b44 --- /dev/null +++ b/.claudesync/reusable-gha-pr-unit-test-coverage-gate.project.json @@ -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": [] +} diff --git a/.gitignore b/.gitignore index 7d86b399..24ae7c7c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,10 @@ .idea **/node_modules /githubCommentsForPR.txt + + +# claude ai +.venv +.claudeignore +.claudesync/*.project_id.json +.claudesync/active_project.json diff --git a/tools/Reusable GHA PR Workflow for Coverage Gate(Unit Test).md b/tools/Reusable GHA PR Workflow for Coverage Gate(Unit Test).md new file mode 100644 index 00000000..40a53fcc --- /dev/null +++ b/tools/Reusable GHA PR Workflow for Coverage Gate(Unit Test).md @@ -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