lnccbrown / lnccbrown/HSSM

CI: coverage.yml re-runs the full suite serially (~2 h) on every main push — upload per-batch coverage instead

Open
#1,076 1 comment 0 reactions 0 assignees View on GitHub
chore github_actions
Dominant language
Python
Stars
124
Forks
24
Avg merge
19h 32m
Merged PRs (30d)
60

Description

## Problem

- `coverage.yml` runs `uv run pytest --cov=src/hssm ...` with **no marker filter**, i.e. the FULL suite, serially, on one Python: measured **117–128 min per code push to main** (runs 29419740256, 29389543016, 29387017378). It only survives the runtime because the job has no `timeout-minutes` (default 360).
- The same push already triggers the 9 batched slow-test jobs (`run_slow_tests.yml`), and the fast suite ran on the PR across 3 Pythons — the coverage run is fully redundant as a correctness gate. It exists only to produce one `coverage.xml`.
- Hardening gaps: the Codecov upload step has no `if: always()`, and the job inherits the global addopts (`--exitfirst`, `--reruns=2`, `--timeout=360`) — one late hard failure wastes ~2 h and uploads nothing; the waic_loo timeout+rerun pathology also fires here on every push.

## Plan

1. Produce coverage in the **existing** jobs instead: on one Python version (e.g. 3.13), pass `--cov=src/hssm --cov-report=xml` to the fast job and each of the 3 slow-batch jobs, and upload each report with `codecov/codecov-action` using flags — Codecov merges partial reports server-side.
2. Add `if: ${{ !cancelled() }}` (or `always()`) to all upload steps.
3. Delete `coverage.yml`'s pytest step (or the whole workflow if nothing else needs it).
4. Validate once: merged main-branch codecov number is ~unchanged vs. before. (Note: slow tests DO contribute to today's tracked coverage — the full suite runs in this job — so this check matters for any test-pruning work that follows.)

## Acceptance

- ~2 h of runner time saved per code push to main; coverage feedback latency drops from ~2 h to ~35 min.
- Codecov main-branch coverage within noise of the pre-change value.

## Ordering

Do together with (or after) #1075 — removing `--cov=.` from global addopts is a prerequisite for the per-job flags to be authoritative.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Contributor guide

Open the contributing guide

Research direction

Start by comparing coverage.yml with the fast and batched slow-test jobs in run_slow_tests.yml, then inspect the global addopts and the prerequisite changes in #1075. Move the named coverage and Codecov steps into the existing jobs, preserve the three slow batches, and verify that uploads still occur after non-cancelled failures. Confirm that the merged main-branch coverage remains within noise of the previous value and that the redundant full-suite workflow no longer runs.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, python
Domain
ci-cd, testing
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.