Skip to content

Add a Modal entrypoint smoke test to CI - #18

Closed
cweill wants to merge 1 commit into
mainfrom
feature/modal-ci-smoke
Closed

cweill wants to merge 1 commit into
mainfrom
feature/modal-ci-smoke

Conversation

@cweill

@cweill cweill commented May 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds CI coverage that catches a broken or missing Modal entrypoint. PR #7 emptied modal_app.py (and deleted its test) without CI noticing — the existing test_modal_app.py tests run against a fake modal stub, so they can't detect real-modal breakage or an emptied module when its test is also gone.

Changes

  • tests/test_modal_app.py: new test_modal_app_constructs_with_real_modal, guarded by pytest.importorskip("modal"), asserting the real app/image/entrypoint construct (app name alphazero).
  • .github/workflows/ci.yml: new step uv run --extra modal pytest tests/test_modal_app.py -q that installs the modal extra and runs the modal tests, so the real-modal smoke actually executes.

How it behaves

  • Main Run tests step uses --extra dev (no modal) → the real-modal test skips.
  • Dedicated step uses --extra modal → the real-modal test runs.
  • No cloud build, no Modal credentials: it only constructs the modal.App/modal.Image objects locally (lazy — no network), which is enough to catch an emptied module or a real-API break (e.g., a bad image kwarg).

Testing

  • Full suite: 144 passed.
  • The CI step run locally (uv run --extra modal pytest tests/test_modal_app.py -q) → 8 passed, with the real-modal test executing (not skipped).
  • ci.yml validated as well-formed YAML.

Review focus

  • Whether a no-cloud import/construct smoke is sufficient, or a real 1-iteration modal run (needs Modal token secret + spends compute per CI run) is wanted later.

Closes alphago-geq.

PR #7 emptied modal_app.py and its test without CI noticing, because nothing
exercised the real modal package (the other modal tests use a fake modal
stub). Add a real-modal smoke: a test guarded by importorskip("modal") that
asserts the app/image/entrypoint actually construct, plus a CI step that
installs the modal extra and runs the modal-app tests. The main test job
(no modal extra) skips it; the dedicated step enforces it. No cloud build or
Modal credentials are needed — it only constructs the app/image objects.

alphago-geq
@cweill

cweill commented May 26, 2026

Copy link
Copy Markdown
Contributor Author

Closing — no CI wanted for this repo (per maintainer).

@cweill cweill closed this May 26, 2026
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