add integration testing report from backend server
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 5m33s

This commit is contained in:
2025-11-25 20:38:51 -08:00
parent b92818ce1f
commit 997446febf
3 changed files with 144 additions and 1 deletions

View File

@@ -113,7 +113,21 @@ jobs:
ls -l .coverage/unit/coverage-final.json
ls -l .coverage/integration/coverage-final.json
# --- V8 Coverage Processing for Backend Server ---
# The integration tests start the server, which generates raw V8 coverage data.
# This step uses the `c8` tool to convert that raw data into a standard
# Istanbul coverage report (`coverage-final.json`) that can be merged.
echo "Processing V8 coverage data from the integration test server..."
# Create a dedicated output directory for the server's coverage report.
mkdir -p .coverage/integration-server
# Run c8: read raw files from the temp dir, and output an Istanbul JSON report.
# We only generate the 'json' report here because it's all nyc needs for merging.
npx c8 report --reporter=json --temp-directory .coverage/tmp/integration-server --reports-dir .coverage/integration-server
echo "Server coverage report generated. Verifying existence:"
ls -l .coverage/integration-server/coverage-final.json
# --- End V8 Coverage Processing ---
# Now we have three coverage reports:
# nyc's `report` command can merge multiple coverage files automatically.
# The standard way to do this is to place all `coverage-final.json` files
# into a single directory and point `nyc report` to it.
@@ -128,6 +142,7 @@ jobs:
# We give them unique names to be safe, though it's not strictly necessary.
cp .coverage/unit/coverage-final.json "$NYC_SOURCE_DIR/unit-coverage.json"
cp .coverage/integration/coverage-final.json "$NYC_SOURCE_DIR/integration-coverage.json"
cp .coverage/integration-server/coverage-final.json "$NYC_SOURCE_DIR/integration-server-coverage.json"
echo "Copied coverage files to source directory. Contents:"
ls -l "$NYC_SOURCE_DIR"