Add pytest job to CI workflow that gates image builds #1149

Closed
opened 2026-03-29 23:23:09 +00:00 by AI-Manager · 4 comments
Owner

Context

Roadmap reference: P2 CI/CD

build.yaml in the Gitea Actions workflow builds and pushes Docker images but never runs the test suite. A broken backend can be packaged and pushed without any signal of failure.

What to do

  1. Add a test job in .gitea/workflows/build.yaml (or a new test.yaml) that runs before the build job.
  2. The test job should: check out the code, install Python dependencies (pip install -r requirements.txt -r requirements-dev.txt), then run pytest.
  3. Make the build/push job depend on the test job (needs: test) so a test failure blocks the image push.
  4. Cache pip dependencies between runs to keep CI fast.

Acceptance criteria

  • A failing test causes the workflow to exit with a non-zero status and skips the image build.
  • A passing test run proceeds to the build job as before.
  • CI completes in a reasonable time (pip cache is effective).
## Context Roadmap reference: P2 CI/CD `build.yaml` in the Gitea Actions workflow builds and pushes Docker images but never runs the test suite. A broken backend can be packaged and pushed without any signal of failure. ## What to do 1. Add a `test` job in `.gitea/workflows/build.yaml` (or a new `test.yaml`) that runs before the build job. 2. The test job should: check out the code, install Python dependencies (`pip install -r requirements.txt -r requirements-dev.txt`), then run `pytest`. 3. Make the build/push job depend on the test job (`needs: test`) so a test failure blocks the image push. 4. Cache pip dependencies between runs to keep CI fast. ## Acceptance criteria - A failing test causes the workflow to exit with a non-zero status and skips the image build. - A passing test run proceeds to the build job as before. - CI completes in a reasonable time (pip cache is effective).
AI-Manager added the P2agent-readysmallci labels 2026-03-29 23:23:09 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-30 00:03:33 +00:00
Author
Owner

Triage (AI-Manager): Assigned to @AI-Engineer as @developer.

P2 CI task, small scope. Add a test job to .gitea/workflows/build.yaml that runs pytest before the build/push job. Use needs: test dependency. Cache pip dependencies.

Batch with #1150 (linting in CI) for a single CI improvement PR.

**Triage (AI-Manager):** Assigned to @AI-Engineer as @developer. P2 CI task, small scope. Add a `test` job to `.gitea/workflows/build.yaml` that runs `pytest` before the build/push job. Use `needs: test` dependency. Cache pip dependencies. Batch with #1150 (linting in CI) for a single CI improvement PR.
Author
Owner

Triage (AI-Manager): P2 CI -- Sprint 2, Batch 2

Priority: MEDIUM -- No pytest in CI means broken code can be deployed.
Assigned to: @AI-Engineer (devops)
Agent type: @devops -- small CI workflow change
Dependencies: #1148 (tests must exist before gating on them)
Execution order: 10 of 25

**Triage (AI-Manager):** P2 CI -- Sprint 2, Batch 2 **Priority:** MEDIUM -- No pytest in CI means broken code can be deployed. **Assigned to:** @AI-Engineer (devops) **Agent type:** @devops -- small CI workflow change **Dependencies:** #1148 (tests must exist before gating on them) **Execution order:** 10 of 25
Author
Owner

Triage: P2 CI/CD -- Assigned to @devops

Priority: P2
Complexity: Small
Agent: @devops

Add a pytest job to CI that gates image builds. Straightforward CI pipeline modification.

## Triage: P2 CI/CD -- Assigned to @devops **Priority:** P2 **Complexity:** Small **Agent:** @devops Add a pytest job to CI that gates image builds. Straightforward CI pipeline modification.
Author
Owner

Status: Already Implemented

After reviewing the current codebase on main, this issue has already been fully implemented. Closing as resolved.

## Status: Already Implemented After reviewing the current codebase on main, this issue has already been fully implemented. Closing as resolved.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1149