Repository navigation
Conversation
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
Contributor
Author
|
Closing — no CI wanted for this repo (per maintainer). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 existingtest_modal_app.pytests 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: newtest_modal_app_constructs_with_real_modal, guarded bypytest.importorskip("modal"), asserting the realapp/image/entrypoint construct (app namealphazero)..github/workflows/ci.yml: new stepuv run --extra modal pytest tests/test_modal_app.py -qthat installs the modal extra and runs the modal tests, so the real-modal smoke actually executes.How it behaves
Run testsstep uses--extra dev(no modal) → the real-modal test skips.--extra modal→ the real-modal test runs.modal.App/modal.Imageobjects locally (lazy — no network), which is enough to catch an emptied module or a real-API break (e.g., a bad image kwarg).Testing
uv run --extra modal pytest tests/test_modal_app.py -q) → 8 passed, with the real-modal test executing (not skipped).ci.ymlvalidated as well-formed YAML.Review focus
modal run(needs Modal token secret + spends compute per CI run) is wanted later.Closes
alphago-geq.