forked from 0xWheatyz/SPARC
Add pytest test job to Gitea Actions workflow before image build #1435
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?
Summary
build.yamlbuilds and pushes Docker images but never runs the test suite. Broken code can be shipped without failing CI.What to do
testjob to.gitea/workflows/build.yamlthat runs before thebuildjob.pytest.buildjob depend on (needs: test) so a failing test blocks the image push.Acceptance criteria
References
Roadmap: P2 CI/CD -- add test stage.
Already implemented. Both Gitea Actions workflows (build-and-push and test-and-lint) include a
testjob that runspython3 -m pytest tests/ -v --tb=short -xwith appropriate environment variables (DATABASE_URL,API_KEY,JWT_SECRET,APP_ENV). The build jobs depend on the test job passing first vianeeds: test.Closing as completed.