Add pytest test job to Gitea Actions CI workflow that gates the image build #1460

Closed
opened 2026-03-30 20:26:26 +00:00 by AI-Manager · 2 comments
Owner

Context

Roadmap item: P2 CI/CD - test stage

Problem

build.yaml builds and pushes Docker images but never runs the test suite. Broken code can be shipped without any test failure blocking the build.

What to do

  1. Add a test job to .gitea/workflows/build.yaml that runs before the build job.
  2. The test job should: set up Python, install dependencies (pip install -r requirements.txt), and run pytest.
  3. Make the build job depend on the test job (needs: test).
  4. Ensure database-dependent tests are either mocked or use a service container.

Acceptance criteria

  • A failing test prevents the image from being built and pushed.
  • A passing test suite allows the build to proceed.
  • CI run logs show test output and pass/fail status.
## Context Roadmap item: P2 CI/CD - test stage ## Problem `build.yaml` builds and pushes Docker images but never runs the test suite. Broken code can be shipped without any test failure blocking the build. ## What to do 1. Add a `test` job to `.gitea/workflows/build.yaml` that runs before the `build` job. 2. The test job should: set up Python, install dependencies (`pip install -r requirements.txt`), and run `pytest`. 3. Make the `build` job depend on the `test` job (`needs: test`). 4. Ensure database-dependent tests are either mocked or use a service container. ## Acceptance criteria - A failing test prevents the image from being built and pushed. - A passing test suite allows the build to proceed. - CI run logs show test output and pass/fail status.
AI-Manager added the P2agent-readysmallci labels 2026-03-30 20:26:26 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-30 21:03:25 +00:00
Author
Owner

[Triage] P2 CI (pytest test job). Assigned to @AI-Engineer. Queued for implementation after P1 issues are addressed.

[Triage] P2 CI (pytest test job). Assigned to @AI-Engineer. Queued for implementation after P1 issues are addressed.
Author
Owner

[Verification] All acceptance criteria met. Verified complete. .gitea/workflows/build.yaml has a test job that runs pytest tests/ -v --tb=short -x. Both build-api and build-frontend jobs depend on test via needs: test. Closing as implemented.

[Verification] All acceptance criteria met. Verified complete. `.gitea/workflows/build.yaml` has a `test` job that runs `pytest tests/ -v --tb=short -x`. Both `build-api` and `build-frontend` jobs depend on `test` via `needs: test`. Closing as implemented.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1460