chore: containerize tests + fix CI workflow #21

Merged
gravityfargo merged 6 commits from chore/containerize-and-pin into main 2026-05-03 17:31:53 +00:00
Owner

Summary

Supersedes #17 and #19. Combines the containerize work + pin + the workflow fix into a single PR that can land atomically — required because `make test` (added by the containerize commit) is what the new CI workflow calls.

Commits

  1. chore: containerize test runner — adds `Dockerfile.test` (extends `code.modernleft.org/modernleft/athena-archive-ci:latest`), migrates `make test` / `make test-slow` to run pytest inside the container.
  2. chore: pin test base image to sha-68c87b1 — replaces `:latest` with the pinned digest in `Dockerfile.test`.
  3. ci: replace per-step setup with Dockerfile.test containercloses #15. Drops the broken `apt-install` + `astral-sh/setup-uv@v7` + `actions/cache@v5` chain (the cache action crashed under Node 18 with `File is not defined`, aborting every run since the renovate bump) and replaces it with `make test`.

Why combined

  • #17 alone can't merge — its CI runs through the broken workflow.
  • #19 depended on #17.
  • The CI workflow fix needs `make test` to exist, so it depends on #17.
  • Three separate PRs would deadlock; merging them as one breaks the cycle.

Verification

  • `make test` locally → 247 passed against the pinned image, ~5s
  • This PR's own CI run (when it fires) is the live test of the workflow change

Test plan

  • CI green (validates the workflow fix in-place)
  • After merge: re-run #16 (ffmpeg) → should also go green
## Summary Supersedes #17 and #19. Combines the containerize work + pin + the workflow fix into a single PR that can land atomically — required because \`make test\` (added by the containerize commit) is what the new CI workflow calls. ### Commits 1. **chore: containerize test runner** — adds \`Dockerfile.test\` (extends \`code.modernleft.org/modernleft/athena-archive-ci:latest\`), migrates \`make test\` / \`make test-slow\` to run pytest inside the container. 2. **chore: pin test base image to sha-68c87b1** — replaces \`:latest\` with the pinned digest in \`Dockerfile.test\`. 3. **ci: replace per-step setup with Dockerfile.test container** — closes #15. Drops the broken \`apt-install\` + \`astral-sh/setup-uv@v7\` + \`actions/cache@v5\` chain (the cache action crashed under Node 18 with \`File is not defined\`, aborting every run since the renovate bump) and replaces it with \`make test\`. ### Why combined - #17 alone can't merge — its CI runs through the broken workflow. - #19 depended on #17. - The CI workflow fix needs \`make test\` to exist, so it depends on #17. - Three separate PRs would deadlock; merging them as one breaks the cycle. ## Verification - \`make test\` locally → 247 passed against the pinned image, ~5s - This PR's own CI run (when it fires) is the live test of the workflow change ## Test plan - [ ] CI green (validates the workflow fix in-place) - [ ] After merge: re-run #16 (ffmpeg) → should also go green
chore: containerize test runner
Some checks failed
Run pytest tests / test (pull_request) Failing after 3m13s
a9e31341ed
Adds Dockerfile.test (extends code.modernleft.org/modernleft/athena-archive-ci:latest)
and migrates the Makefile test targets to run the suite inside the
container so local runs match CI exactly.

- make test: docker run, fast suite (excludes @slow / @largescale)
- make test-slow: bind-mounts tests/data/ for the full suite
- build-test-image is a layer-cached no-op when nothing changed
Replaces the floating ":latest" tag so every developer (and CI) builds
against the same base image bytes. Bump in lockstep with new CI image
publishes.
ci: replace per-step setup with Dockerfile.test container
Some checks failed
Run pytest tests / test (pull_request) Failing after 33s
0e02bc9e41
Closes #15. Old workflow installed poppler/ffmpeg via apt, set up uv
via astral-sh/setup-uv@v7, cached test fixtures via actions/cache@v5,
then ran pytest directly. The cache@v5 step crashed under the
runner's Node.js v18 with "ReferenceError: File is not defined"
(undici uses Node 20+ globals), aborting every run since the renovate
bump.

Switching to `make test` runs pytest inside Dockerfile.test, which
already bakes in python 3.14.3 + uv + ffmpeg + exiftool + poppler via
the athena-archive-ci base image. No more apt-install, no more
setup-uv, no more cache action — and the env exactly matches local.

Slow / largescale tests stay local-only (`make test-slow` with
bind-mounted tests/data).
ci: bundle external test fixtures into Dockerfile.test
Some checks failed
Run pytest tests / test (pull_request) Failing after 28s
3836c31990
CI checkouts don't have tests/data/ (gitignored). Two tests reference
fixtures unconditionally without skipif (test_pdf_thumbs.py:23,
test_video_thumbs.py:23 — see #18) so they fail outright in a fresh
container build.

Bundles the PDF + MP4 via curl in the source layer. Layer cache
ensures re-download only when the URLs change.

This unblocks #15 entirely; #18 stays open for the longer-term decision
between vendoring synthetic fixtures vs. keeping these.
ci: run pytest inside athena-archive-ci container directly
Some checks failed
Run pytest tests / test (pull_request) Failing after 6s
1b96f596a9
Per-spec: runs-on: docker + container: image: athena-archive-ci pin.
The CI image already has python 3.14.3 + uv + ffmpeg + exiftool +
poppler baked in, so apt-install and astral-sh/setup-uv are no longer
needed. Cache fixtures via actions/cache@v4 (v5 requires Node 20+,
which isn't guaranteed on the host runner).

Reverts the Dockerfile.test fixture bundle from the previous commit:
that approach failed in CI on a marxists.org 500, and is moot now
that CI doesn't use Dockerfile.test. Local devs supply their own
tests/data/.
ci: use curl instead of wget (CI image has curl, not wget)
All checks were successful
Run pytest tests / test (pull_request) Successful in 24s
772d81b304
gravityfargo deleted branch chore/containerize-and-pin 2026-05-03 17:31:53 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ModernLeft/athena-file!21
No description provided.