forked from 0xWheatyz/SPARC
Add pytest test stage to Gitea Actions workflow to gate image builds #748
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
Roadmap reference: P2 - No test stage in the Gitea Actions workflow
build.yamlbuilds and pushes Docker images but never runs the test suite. A broken commit can be pushed to the registry without detection.What to do
testjob to.gitea/workflows/build.yamlthat runs before thebuildjobpytest tests/buildjob to depend on (needs: test) so it only runs if tests passAcceptance criteria
testjob exists in the workflow YAMLbuildjob depends ontestand does not run if tests failResolved.
.gitea/workflows/build.yamlcontains atestjob that runspytest tests/ -vbefore thebuild-apijob (needs: test). Tests gate the image build.