Template
Layered promotion-gated test pipeline: build once → test at dev → rc → prod #4
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Restructure testing so it's layered across the deploy tiers (dev → rc → prod) instead of only running on dev, with each tier requiring a stable, tested build before it promotes. Pairs with the deploy workflows (Template-Go#3) and the new RC environment.
Principle: build once, test, promote the artifact
Build a single image, test it, and promote the same tested artifact up the tiers — don't rebuild an untested image at each stage.
devrcrc.git→ run suite + smoke tests against the live RC instance → stable → eligible formainmainSo tests run at dev and rc; each tier certifies a stable build before the next.
Prerequisites (blockers — must land first)
tests/integrationmust compile and run. It's currently broken (API drift never propagated to the tests — auth_oauth2 dup func → NewRequestWithBody[]byte→io.Reader → value-vs-pointer → …). A tested pipeline can't gate on a suite that doesn't build. This is a fork-wide integration-test repair (tracked separately).Design notes
vars.*/secrets.*so it works across Go server repos. Lives in the root.mokogitea/workflows/synced from here.Related: Template-Go#3 (deploy workflows), MokoGitea-Fork#751 (deploy-rc), Template-Generic#71 (release-notes). Prereq: fork-wide integration-test repair.
https://claude.ai/code/session_01Wsno14cxE49MstXFs9G5KT
Both prerequisites are now cleared — this is implementable
tests/integrationcompiles — repaired in MokoGitea-Fork #755 (composer value→pointer +oauth_avatar_test.goupstream-import drift).go vet ./tests/integration/...exits 0.needs-chain to runners, soProject CI / Testssat inwaitingand was reaped. Fixed by making the Tests job independent (MokoGitea-Fork #756 + Template-Generic #78); verified the Tests job now schedules + runs (run 34999).The paired deploy workflows (Template-Go#3, PR #5) are also ready. So the layered pipeline can now be built: build-once → test at dev → promote the tested artifact to rc → gate prod on RC health (replacing the old dev-health gate that was just removed in MokoGitea-Fork #758).
https://claude.ai/code/session_01Wsno14cxE49MstXFs9G5KT