From 5ed2cea7e907c4f9df21b5f26786f7531cccae9b Mon Sep 17 00:00:00 2001 From: Torben Sorensen Date: Mon, 29 Dec 2025 21:27:28 -0800 Subject: [PATCH] /coverage --- .gitea/workflows/deploy-to-test.yml | 35 ++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/deploy-to-test.yml b/.gitea/workflows/deploy-to-test.yml index 2dc44f3d..89aa0610 100644 --- a/.gitea/workflows/deploy-to-test.yml +++ b/.gitea/workflows/deploy-to-test.yml @@ -151,6 +151,9 @@ jobs: --coverage.exclude='src/db/**' \ --coverage.exclude='src/lib/**' \ --coverage.exclude='src/types/**' \ + --coverage.exclude='**/index.tsx' \ + --coverage.exclude='**/vite-env.d.ts' \ + --coverage.exclude='**/vitest.setup.ts' \ --reporter=verbose --includeTaskLocation --testTimeout=10000 --silent=passed-only --no-file-parallelism || true echo "--- Running Integration Tests ---" @@ -162,6 +165,9 @@ jobs: --coverage.exclude='src/db/**' \ --coverage.exclude='src/lib/**' \ --coverage.exclude='src/types/**' \ + --coverage.exclude='**/index.tsx' \ + --coverage.exclude='**/vite-env.d.ts' \ + --coverage.exclude='**/vitest.setup.ts' \ --reporter=verbose --includeTaskLocation --testTimeout=10000 --silent=passed-only || true echo "--- Running E2E Tests ---" @@ -175,6 +181,9 @@ jobs: --coverage.exclude='src/db/**' \ --coverage.exclude='src/lib/**' \ --coverage.exclude='src/types/**' \ + --coverage.exclude='**/index.tsx' \ + --coverage.exclude='**/vite-env.d.ts' \ + --coverage.exclude='**/vitest.setup.ts' \ --reporter=verbose --no-file-parallelism || true # Re-enable secret masking for subsequent steps. @@ -246,7 +255,10 @@ jobs: --temp-dir "$NYC_SOURCE_DIR" \ --exclude "**/*.test.ts" \ --exclude "**/tests/**" \ - --exclude "**/mocks/**" + --exclude "**/mocks/**" \ + --exclude "**/index.tsx" \ + --exclude "**/vite-env.d.ts" \ + --exclude "**/vitest.setup.ts" # Re-enable secret masking for subsequent steps. echo "::secret-masking::" @@ -259,16 +271,6 @@ jobs: if: always() # This step runs even if the previous test or coverage steps failed. run: echo "Skipping test artifact cleanup on runner; this is handled on the server." - - name: Deploy Coverage Report to Public URL - if: always() - run: | - TARGET_DIR="/var/www/flyer-crawler-test.projectium.com/coverage" - echo "Deploying HTML coverage report to $TARGET_DIR..." - mkdir -p "$TARGET_DIR" - rm -rf "$TARGET_DIR"/* - cp -r .coverage/* "$TARGET_DIR/" - echo "✅ Coverage report deployed to https://flyer-crawler-test.projectium.com/coverage" - - name: Archive Code Coverage Report # This action saves the generated HTML coverage report as a downloadable artifact. uses: actions/upload-artifact@v3 @@ -358,6 +360,17 @@ jobs: rsync -avz dist/ "$APP_PATH" echo "Application deployment complete." + - name: Deploy Coverage Report to Public URL + if: always() + run: | + TARGET_DIR="/var/www/flyer-crawler-test.projectium.com/coverage" + echo "Deploying HTML coverage report to $TARGET_DIR..." + mkdir -p "$TARGET_DIR" + rm -rf "$TARGET_DIR"/* + # The merged nyc report is generated in the .coverage directory. We copy its contents. + cp -r .coverage/* "$TARGET_DIR/" + echo "✅ Coverage report deployed to https://flyer-crawler-test.projectium.com/coverage" + - name: Install Backend Dependencies and Restart Test Server env: # --- Test Secrets Injection ---