From 6c6a4ab0d78ae52d98fb5a91735756ff0694d8ff Mon Sep 17 00:00:00 2001 From: Torben Sorensen Date: Mon, 24 Nov 2025 18:43:12 -0800 Subject: [PATCH] better deploys --- .gitea/workflows/deploy.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 427dd3ba..1eba435d 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -107,15 +107,23 @@ jobs: if: always() # This step runs even if the previous test step failed. run: | echo "--- Merging Coverage Reports and Displaying Text Summary ---" - # Step 1: Merge the coverage data from both unit and integration test runs - # into a single file in the .coverage directory. - npx nyc merge .coverage/integration .coverage/unit + + # Add logging to verify that the source coverage files exist before merging. + echo "Checking for source coverage files..." + ls -l .coverage/unit/coverage-final.json + ls -l .coverage/integration/coverage-final.json + + # Step 1: Explicitly merge the two coverage-final.json files into a single output file. + # This is more robust than letting nyc guess the files. + echo "Merging coverage data..." + npx nyc merge .coverage/merged .coverage/unit/coverage-final.json .coverage/integration/coverage-final.json + # Move the merged file to the root of the .coverage directory for the report step. mv .coverage/merged/coverage.json .coverage/coverage.json - # Step 2: Generate the text summary from the merged data and print it to the console. - npx nyc report --reporter=text - # Step 3: Generate the final HTML report from the same merged data for archiving. - npx nyc report --reporter=html --report-dir .coverage/ + # Step 2: Generate the text summary and HTML report from the single, merged coverage file. + echo "Generating reports from merged data..." + npx nyc report --reporter=text --reporter=html --report-dir .coverage/ + echo "✅ Coverage reports generated successfully." - name: Archive Code Coverage Report # This action saves the generated HTML coverage report as a downloadable artifact.