Commit d7dddc8e authored by Aryan Noshirvnai's avatar Aryan Noshirvnai

CI: don't re-run the test suite on main, deploy immediately instead

main only ever advances by merging already-tested dev commits - re-running
pytest there duplicated work for no benefit and just delayed the actual
deploy. test now only runs on dev; deploy_prod on main fires right away
with nothing to wait on.
Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
parent 7bce94be
Pipeline #1173 passed with stage
in 7 minutes and 33 seconds
......@@ -12,8 +12,9 @@ cache:
- .cache/pip/
- .cache/ffmpeg-static/
# Runs on every push to dev or main. deploy_prod below fires automatically once this passes on
# main.
# Runs on every push to dev only - main is only ever updated by merging already-tested dev
# commits (see deploy_prod below), so re-running the same suite again on main would just repeat
# work already done, not catch anything new.
test:
stage: test
image: python:3.10-slim
......@@ -49,11 +50,11 @@ test:
- PYTHONPATH=. pytest tests/ -v
only:
- dev
- main
# Only ever runs on main, and fires automatically once the test job above passes. Copies the
# repo's current deploy.sh onto prod and runs it there over SSH - deploy.sh itself handles
# everything else (bootstrapping a bare box, or updating an already-deployed one).
# Only ever runs on main, and fires immediately (test doesn't run on main at all - see above,
# main only ever advances by merging commits already tested on dev, so nothing left to gate on).
# Copies the repo's current deploy.sh onto prod and runs it there over SSH - deploy.sh itself
# handles everything else (bootstrapping a bare box, or updating an already-deployed one).
deploy_prod:
stage: deploy
image: python:3.10-slim
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment