From ae43a6c28bb8b5ff804cae32e425123ccc121211 Mon Sep 17 00:00:00 2001 From: Yash Karakoti Date: Tue, 30 Jun 2026 00:29:56 +0530 Subject: [PATCH] ci: add 70% test coverage gate for documents module (#753) --- .github/workflows/ci.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7eff6640..223421c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,6 +80,15 @@ jobs: JWT_SECRET: test-secret-key JWT_REFRESH_SECRET: test-refresh-secret-key + # --- NEW STEP ADDED FOR ISSUE #753 --- + - name: Check documents module test coverage (>70%) + run: npx jest src/documents --coverage --collectCoverageFrom="src/documents/**/*.ts" --coverageThreshold='{"global":{"statements":70,"branches":70,"functions":70,"lines":70}}' + env: + DATABASE_URL: postgresql://postgres:postgres@localhost:5432/test + JWT_SECRET: test-secret-key + JWT_REFRESH_SECRET: test-refresh-secret-key + # ------------------------------------- + build: runs-on: ubuntu-latest needs: [lint, test] @@ -141,4 +150,4 @@ jobs: run: | echo "Deploying to production environment..." # Add your deployment commands here - # Example: scp -r dist/* user@production-server:/path/to/app + # Example: scp -r dist/* user@production-server:/path/to/app \ No newline at end of file