Skip to content

ci: publish Python and Node coverage reports - #128

Open
scotluns wants to merge 2 commits into
mainfrom
ci/coverage-reports
Open

scotluns wants to merge 2 commits into
mainfrom
ci/coverage-reports

Conversation

@scotluns

Copy link
Copy Markdown
Collaborator

Why

Make coverage gaps visible alongside existing test results without introducing a coverage threshold or external reporting service.

What Changed

  • Run the existing Python test job under Coverage.py with branch and subprocess tracking across all three source packages. Publish its file-level Markdown summary plus HTML, XML, and JSON artifacts.
  • Run the existing site test job through c8, including unloaded Node utilities and build scripts. Publish a separate summary plus HTML, LCOV, and summary JSON artifacts.
  • Attempt reporting and artifact retention after failed tests, preserve test failures, and keep generated reports out of Git and frontend analysis. Document scopes and local commands.

The diff contains 121 handwritten lines and 385 generated lockfile lines. No new test scenarios, production behavior, CI jobs, secrets, or service integrations.

How To Verify

  • 223 Python tests passed under coverage on Python 3.12.
  • 20 Node tests passed under coverage on Node 22.23.4, matching CI.
  • Verified generated reports, inclusion of all Node source files in scope, Python subprocess capture, and the Node workflow summary command.
  • actionlint, Ruff, ESLint, TypeScript, Astro diagnostics, Markdown lint/formatting, and Python lock consistency checks passed.

See CI.md for reproduction commands. Review the python-coverage and node-coverage artifacts and job summaries after this PR's CI runs.

Known Gaps

Node coverage measures .mjs utilities and build scripts, not browser-executed React or Astro UI. Tests that execute temporary copies of scripts do not attribute that execution to original source paths; those scripts may appear uncovered. Coverage thresholds are deliberately deferred.

Run existing Python and Node tests with Coverage.py and c8. Publish separate job summaries and downloadable HTML and machine-readable reports, including reports after test failures when coverage data exists. Keep coverage informational without new thresholds or external services.

Include Python subprocesses and unloaded source modules. Label Node utility/build-script scope and document that fixture copies are not attributed to original paths. Ignore generated report files in Git and frontend analysis.

Validation: 223 Python tests on Python 3.12 and 20 Node tests on Node 22.23.4 pass. Report formats, source inclusion, subprocess capture, and Node job-summary rendering verified; actionlint, Ruff, ESLint, TypeScript, Astro, Markdown lint/formatting, and lock consistency checks pass.

Applied implement, durable-behavior-tests, scope-maintainable-contribution, reader-first-documentation, and code-review. Checkpoint removed duplicate HTML generation and simplified artifact selection. Final standards/spec review found no remaining actionable issues. Changes comprise 121 handwritten lines and 385 generated lockfile lines. No application behavior or test scenarios changed.
Print statement and branch percentages from the existing Python and Node JSON reports and tee each headline into the job summary. Validated both commands against generated reports; actionlint and diff checks pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant