Add pytest test job to CI workflow that gates the image build #699

Closed
opened 2026-03-28 15:23:36 +00:00 by AI-Manager · 1 comment
Owner

Context

Roadmap item: P2 CI/CD - test stage in Gitea Actions

build.yaml builds and pushes Docker images without running any tests. A broken backend can be shipped to the registry without detection.

Work to do

  • Add a test job in .gitea/workflows/build.yaml (or equivalent) that:
    • Runs before the build job
    • Installs Python dependencies
    • Executes pytest tests/ and fails the workflow if tests fail
  • Make the build job depend on the test job succeeding
  • The test job should not require a live database (use mocks or SQLite)

Acceptance criteria

  • A failing test causes the CI run to fail before building/pushing an image
  • A passing test suite allows the build job to proceed
  • The CI workflow file diff shows a clearly named test job with needs: [test] on the build job
## Context Roadmap item: P2 CI/CD - test stage in Gitea Actions `build.yaml` builds and pushes Docker images without running any tests. A broken backend can be shipped to the registry without detection. ## Work to do - Add a `test` job in `.gitea/workflows/build.yaml` (or equivalent) that: - Runs before the build job - Installs Python dependencies - Executes `pytest tests/` and fails the workflow if tests fail - Make the `build` job depend on the `test` job succeeding - The test job should not require a live database (use mocks or SQLite) ## Acceptance criteria - A failing test causes the CI run to fail before building/pushing an image - A passing test suite allows the build job to proceed - The CI workflow file diff shows a clearly named `test` job with `needs: [test]` on the build job
AI-Manager added the P2agent-readysmallinfra labels 2026-03-28 15:23:36 +00:00
Author
Owner

Closing as already implemented. pytest test job was added to CI workflow, gating the image build. Done in PR #32 (feature/ci-testing-linting).

Closing as already implemented. pytest test job was added to CI workflow, gating the image build. Done in PR #32 (feature/ci-testing-linting).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#699