Skip to content

ci: run the unit tests and lint the diff on every pull request - #25

Merged
hallelx2 merged 1 commit into
mainfrom
halleluyaholudele/hal-4142-no-ci-runs-on-the-repo
Oct 25, 2026
Merged

hallelx2 merged 1 commit into
mainfrom
halleluyaholudele/hal-4142-no-ci-runs-on-the-repo

Conversation

@hallelx2

Copy link
Copy Markdown
Collaborator

Nothing ran on a pull request. gh pr view returns statusCheckRollup: [] for every PR in this repo's history — #18 through #24 all merged CLEAN purely because nothing was configured to say otherwise. Green and absent are indistinguishable to gh, so a merge gate reading "merge once fully green" was vacuous. The 470 unit tests ran only when someone remembered to run them.

Two jobs

test — uv sync --frozen --group dev then pytest tests/unit.

--frozen is deliberate: a lockfile that has drifted from pyproject.toml fails the job rather than quietly resolving something different from what developers run. Python is pinned to 3.13 (what requires-python demands) so a runner image change cannot move it silently.

lint — ruff on the files the change touches, not the whole tree.

The tree carries ~140 pre-existing ruff errors. Gating on all of them would block every PR on work unrelated to it, and a check that cannot pass is a check that gets switched off. Gating the diff keeps new code clean while the backlog is paid down separately.

Verified before committing

Both branches of the diff step were run against real ranges:

$ # this PR — adds only YAML
base=b6862fb…
no Python files changed            → pass

$ # origin/main~2...origin/main
checking 4 files:
  src/cancerag/pipeline.py
  src/cancerag/preprocessing/binding_site.py
  tests/unit/test_pipeline_staleness.py
  tests/unit/test_receptor_repairs.py
All checks passed!                 → EXIT=0

The empty case matters because set -u plus an unset array is a common way for this exact step to break only on the PRs that touch no Python.

The workflow YAML parses, and uv sync --frozen succeeds against the current lock.

Not done here

  • Making test a required status check on main — that is a repository setting, not a file, and it cannot be set from the PR. It needs doing once in Settings → Branches after this merges, or the checks will run and still not block anything. Flagging rather than silently leaving it.
  • tests/integration — left out; it needs the docking stack, which is not available on a hosted runner.
  • The ~140 pre-existing ruff errors, which are their own cleanup.

Closes HAL-4142

Nothing ran on a pull request. `gh pr view` returned
`statusCheckRollup: []` for every PR in the repo's history, so each one
merged `CLEAN` purely because nothing was configured to say otherwise --
green and absent are indistinguishable to `gh`, and a merge gate reading
"merge once fully green" was vacuous. The 470 unit tests ran only when
someone remembered to run them.

Two jobs. `test` syncs with `--frozen`, so a lockfile that has drifted from
pyproject fails rather than quietly resolving something other than what
developers run, then runs `pytest tests/unit`.

`lint` runs ruff on the files the change touches, not the whole tree. The
tree carries about 140 pre-existing ruff errors; gating on all of them would
block every PR on work unrelated to it, and a check that cannot pass gets
switched off. Gating the diff keeps new code clean while the backlog is paid
down separately.

Both the empty and non-empty paths of the diff step were exercised against
real ranges before committing: no Python files changed yields a pass, and
the previous two commits yield four files and a clean run.

tests/integration is left out for now: it needs the docking stack, which is
not on a hosted runner.
@hallelx2
hallelx2 merged commit d4f0b1c into main Oct 25, 2026
4 checks passed
@hallelx2
hallelx2 deleted the halleluyaholudele/hal-4142-no-ci-runs-on-the-repo branch October 25, 2026 07:35
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