Skip to content

Commit f912d08

Browse files
cailmdaleyclaude
andcommitted
ci: fast-test workflow on push and PR
Add `.github/workflows/fast-tests.yml`: the quick inner-loop gate that runs the `tests/` suite minus the heavy and cluster tiers — `pytest -m "not slow and not candide"` — on every push and pull request. It complements `deploy-image.yml` (which builds the dev image and runs the *full* suite inside it) by skipping the Docker build, so it returns in minutes. Matches the repo's conventions: SHA-pinned actions (covered by the existing github-actions dependabot policy), Python 3.12, and the environment reproduced from `uv.lock` via `uv sync --frozen --extra test` — the same pinned set a developer's `.venv` carries, including the pinned ngmix git source. Tests that need the astromatic binaries self-skip via `shutil.which`, so they don't run here (the dev-image CI exercises them). Concurrency-cancels superseded runs. Verified the exact invocation locally: 276 passed, 5 skipped, 2 deselected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 0ee0e94 commit f912d08

1 file changed

Lines changed: 60 additions & 0 deletions

File tree

.github/workflows/fast-tests.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Fast tests
2+
3+
# The fast inner-loop signal: the `tests/` suite minus the heavy and
4+
# cluster-only tiers (`-m "not slow and not candide"`), run on every push and
5+
# pull request. This is the quick gate that complements — does not replace —
6+
# `deploy-image.yml`, which builds the dev image and runs the *full* suite
7+
# inside it (the environment that ships). This job skips the Docker build, so
8+
# it returns in a couple of minutes instead of waiting on the image.
9+
#
10+
# Environment is reproduced from `uv.lock` (the repo's single source of pinned
11+
# versions) with `uv sync --frozen`, so CI installs exactly what a developer's
12+
# `.venv` does — no parallel pin set. Tests that need the astromatic binaries
13+
# (Source Extractor, PSFEx) self-skip via `shutil.which`, so they simply don't
14+
# run here; the dev-image CI exercises them.
15+
on:
16+
push:
17+
branches:
18+
- '**'
19+
pull_request:
20+
workflow_dispatch:
21+
22+
# A newer push to the same ref cancels an in-flight run — the fast loop only
23+
# cares about the latest commit.
24+
concurrency:
25+
group: fast-tests-${{ github.ref }}
26+
cancel-in-progress: true
27+
28+
jobs:
29+
fast-tests:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout repository
33+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
34+
35+
# uv is the project's package manager; pin the Python it provisions to the
36+
# `requires-python` floor (3.12) so CI matches the container.
37+
- name: Set up uv
38+
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
39+
with:
40+
python-version: "3.12"
41+
enable-cache: true
42+
43+
# `--frozen` installs the exact versions in uv.lock (incl. the pinned
44+
# ngmix git source) — no resolution, no drift from what ships.
45+
- name: Install (test extra, from lockfile)
46+
run: uv sync --frozen --extra test
47+
48+
# The fast tier: everything under the single `tests/` root except `slow`
49+
# and `candide`. Coverage gates are dropped here (this job is about speed,
50+
# not the coverage report) and the deterministic Hypothesis profile is
51+
# pinned, matching the dev-image CI step.
52+
- name: Run fast suite
53+
env:
54+
HYPOTHESIS_PROFILE: ci
55+
SHAPEPIPE_ON_CANDIDE: "0"
56+
run: >-
57+
uv run --frozen
58+
pytest -m "not slow and not candide"
59+
-o addopts="--strict-markers"
60+
-rs

0 commit comments

Comments
 (0)