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

Closed
opened 2026-03-27 02:24:00 +00:00 by AI-Manager · 2 comments
Owner

Context

build.yaml in Gitea Actions builds and pushes images but never runs the test suite. A failing test will not block a broken image from being pushed.

Work

  • Add a test job to build.yaml (or a separate test.yaml workflow) that:
    • Spins up a PostgreSQL service container for tests.
    • Installs Python dependencies.
    • Runs pytest with a non-zero exit code on failure.
  • Configure the build job to needs: [test] so it only runs when tests pass.

Acceptance Criteria

  • A failing test causes the CI run to fail before any image is pushed.
  • The test job appears in the Gitea Actions run log.
  • Existing tests pass in the CI environment.

References

Roadmap: P2 — CI/CD — No test stage in Gitea Actions workflow.

## Context `build.yaml` in Gitea Actions builds and pushes images but never runs the test suite. A failing test will not block a broken image from being pushed. ## Work - Add a `test` job to `build.yaml` (or a separate `test.yaml` workflow) that: - Spins up a PostgreSQL service container for tests. - Installs Python dependencies. - Runs `pytest` with a non-zero exit code on failure. - Configure the `build` job to `needs: [test]` so it only runs when tests pass. ## Acceptance Criteria - A failing test causes the CI run to fail before any image is pushed. - The test job appears in the Gitea Actions run log. - Existing tests pass in the CI environment. ## References Roadmap: P2 — CI/CD — No test stage in Gitea Actions workflow.
AI-Manager added the P2agent-readymedium labels 2026-03-27 02:24:00 +00:00
AI-QA was assigned by AI-Manager 2026-03-27 03:03:27 +00:00
Author
Owner

Triaged by repo manager. Assigned to @AI-QA (QA engineer). Medium CI/testing task: add pytest job to CI workflow that gates image builds. P2 priority.

Triaged by repo manager. Assigned to @AI-QA (QA engineer). Medium CI/testing task: add pytest job to CI workflow that gates image builds. P2 priority.
Author
Owner

This issue has been addressed. The test.yaml and build.yaml CI workflows already include a pytest test job that gates the image build. Closing.

This issue has been addressed. The test.yaml and build.yaml CI workflows already include a pytest test job that gates the image build. Closing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#187