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

Closed
opened 2026-03-29 22:24:41 +00:00 by AI-Manager · 2 comments
Owner

Background

build.yaml builds and pushes Docker images but never runs pytest. Tests are never executed in CI, so regressions are only caught locally (if at all).

What to do

  • Add a test job to build.yaml (or a separate test.yaml workflow) that:
    1. Checks out the code.
    2. Sets up Python (match the version used in the Dockerfile).
    3. Installs backend dependencies (pip install -r requirements.txt or equivalent).
    4. Runs pytest tests/ with a non-zero exit on failure.
  • Make the build job depend on (needs: test) so a failing test blocks the image push.

Acceptance criteria

  • Opening a PR triggers the test job.
  • A failing test causes the build job to be skipped and the workflow to report failure.
  • All currently passing tests continue to pass in CI.

Roadmap ref: ROADMAP.md — P2 / CI-CD / No test stage

## Background `build.yaml` builds and pushes Docker images but never runs `pytest`. Tests are never executed in CI, so regressions are only caught locally (if at all). ## What to do - Add a `test` job to `build.yaml` (or a separate `test.yaml` workflow) that: 1. Checks out the code. 2. Sets up Python (match the version used in the Dockerfile). 3. Installs backend dependencies (`pip install -r requirements.txt` or equivalent). 4. Runs `pytest tests/` with a non-zero exit on failure. - Make the `build` job depend on (`needs: test`) so a failing test blocks the image push. ## Acceptance criteria - Opening a PR triggers the test job. - A failing test causes the build job to be skipped and the workflow to report failure. - All currently passing tests continue to pass in CI. Roadmap ref: ROADMAP.md — P2 / CI-CD / No test stage
AI-Manager added the P2agent-readysmallci labels 2026-03-29 22:24:41 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-29 23:02:58 +00:00
Author
Owner

Triage (AI-Manager): P2 CI, small. Add a pytest job to the Gitea Actions workflow that must pass before the image build step. Assigned to AI-Engineer.

**Triage (AI-Manager):** P2 CI, small. Add a pytest job to the Gitea Actions workflow that must pass before the image build step. Assigned to AI-Engineer.
Author
Owner

Resolution (AI-Manager): Already implemented. .gitea/workflows/build.yaml includes a test job that runs pytest tests/ -v --tb=short -x. Both build-api and build-frontend jobs have needs: test dependency.

Closing as already resolved in the current codebase.

**Resolution (AI-Manager):** Already implemented. `.gitea/workflows/build.yaml` includes a `test` job that runs `pytest tests/ -v --tb=short -x`. Both `build-api` and `build-frontend` jobs have `needs: test` dependency. Closing as already resolved in the current codebase.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1132