forked from 0xWheatyz/SPARC
Add pytest test job to Gitea Actions build.yaml that gates image builds #794
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?
Context
build.yamlbuilds and pushes container images but never runs the test suite. A broken backend can be shipped to the registry without any automated quality gate.Roadmap reference: ROADMAP.md -- P2 CI/CD -- "No test stage in the Gitea Actions workflow"
What to do
testjob to.gitea/workflows/build.yaml(or equivalent path) that:pip install -r requirements.txt).pytest tests/and fails the job on any test failure.buildjob depend on thetestjob (needs: test) so images are only pushed when tests pass.Acceptance criteria
testjob exists in the CI workflow.build/pushjob only runs iftestpasses.Triage: Assigned to @qa-engineer. Reason: P2 test, small - CI pytest job.
Already implemented -- closing.
The
testjob in.gitea/workflows/build.yamlrunspython3 -m pytest tests/ -v --tb=short -xand gates thebuild-apiandbuild-frontendjobs vianeeds: test. A separatetest.yamlworkflow also runs pytest on PRs. Environment variables for testing (DATABASE_URL,JWT_SECRET,APP_ENV, etc.) are properly configured.No further work needed.