Skip to content

Test on PRs, auto-deploy staging, gate prod - #8

Merged
keval6b merged 1 commit into
mainfrom
ci/test-stg-then-prd
Sep 21, 2026
Merged

keval6b merged 1 commit into
mainfrom
ci/test-stg-then-prd

Conversation

@keval6b

@keval6b keval6b commented Sep 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • PRs run uv run pytest (fakes, no AWS deploy).
  • Push to main waits for tests, then auto-applies staging (environment: stg, no reviewers) and syncs a PostHog-free frontend.
  • Production still uses a saved plan plus the prd approval gate, and does not start until staging apply succeeded.

Trust / env

The staging job assumes vars.AWS_DEPLOY_ROLE_ARN with OIDC subject environment:stg. Allow that in the deploy role trust (alongside environment:prd), and create a GitHub Environment named stg with no required reviewers. AWS_DEPLOY_ROLE_ARN needs to be visible to that job (repo variable, not only the prd environment).

Test plan

  • Open this PR and confirm the Test workflow runs pytest only
  • After merge, confirm staging apply runs without approval
  • Confirm the prd apply job still waits for review and only then after stg succeeded

PRs only pytest. Push to main applies the stg stack unattended,
then the existing prd environment still blocks production.
@keval6b
keval6b merged commit 7756fa3 into main Sep 21, 2026
1 check passed
@keval6b
keval6b deleted the ci/test-stg-then-prd branch September 21, 2026 11:11
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