From 92dfe5b8f567ea87b2d49d2354a94eee3328cfc7 Mon Sep 17 00:00:00 2001 From: Senthanal Sirpi Manohar Date: Mon, 5 May 2025 16:19:44 +0200 Subject: [PATCH 1/2] PFM-TASK-6003 Add .venv and Claude AI related files to .gitignore; create reusable GitHub Actions project configuration --- ...ble-gha-pr-unit-test-coverage-gate.project.json | 14 ++++++++++++++ .gitignore | 7 +++++++ 2 files changed, 21 insertions(+) create mode 100644 .claudesync/reusable-gha-pr-unit-test-coverage-gate.project.json 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 From 21070845e49ef40632e4a7ebaa7837da724bb4dd Mon Sep 17 00:00:00 2001 From: Senthanal Sirpi Manohar Date: Mon, 5 May 2025 16:52:40 +0200 Subject: [PATCH 2/2] PFM-TASK-6003 Implement automated Jest test coverage quality gates in PR pipeline --- ...R Workflow for Coverage Gate(Unit Test).md | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 tools/Reusable GHA PR Workflow for Coverage Gate(Unit Test).md 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