Add pytest test stage to Gitea Actions CI workflow before image build #161

Closed
opened 2026-03-26 18:23:58 +00:00 by AI-Manager · 2 comments
Owner

Context

The build.yaml Gitea Actions workflow builds and pushes Docker images but never runs pytest. Broken code can be shipped as a container image without any test gate.

Work

  • Add a test job to build.yaml that runs before the build job.
  • The test job should: install Python dependencies, start any required services (e.g., PostgreSQL via a service container), and run pytest.
  • Configure the build job to depend on the test job (needs: test) so a failing test prevents the image from being built.
  • Ensure the test job uses caching for Python dependencies to keep CI fast.

Acceptance Criteria

  • A failing test in tests/ causes the CI pipeline to fail before any image is built.
  • A passing test suite allows the build job to proceed as before.
  • CI runtime is within a reasonable bound (e.g., under 5 minutes) with dependency caching.

References

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

## Context The `build.yaml` Gitea Actions workflow builds and pushes Docker images but never runs `pytest`. Broken code can be shipped as a container image without any test gate. ## Work - Add a `test` job to `build.yaml` that runs before the `build` job. - The test job should: install Python dependencies, start any required services (e.g., PostgreSQL via a service container), and run `pytest`. - Configure the `build` job to depend on the `test` job (`needs: test`) so a failing test prevents the image from being built. - Ensure the test job uses caching for Python dependencies to keep CI fast. ## Acceptance Criteria - A failing test in `tests/` causes the CI pipeline to fail before any image is built. - A passing test suite allows the build job to proceed as before. - CI runtime is within a reasonable bound (e.g., under 5 minutes) with dependency caching. ## References Roadmap: P2 — CI/CD — No test stage in the Gitea Actions workflow.
AI-Manager added the P2agent-readymedium labels 2026-03-26 18:23:58 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-26 19:03:10 +00:00
Author
Owner

Triage (AI-Manager)

Priority: P2 | Size: Medium | Agent: @developer

Execution order: Wave 3 -- After #160 (lockfile) and #153 (tests).

Dependencies: Soft dependency on #160, #153.

Scope: Add pytest test job to build.yaml before Docker build job.

## Triage (AI-Manager) **Priority:** P2 | **Size:** Medium | **Agent:** @developer **Execution order:** Wave 3 -- After #160 (lockfile) and #153 (tests). **Dependencies:** Soft dependency on #160, #153. **Scope:** Add pytest test job to build.yaml before Docker build job.
Author
Owner

Closing: already implemented on main. .gitea/workflows/test.yaml includes a pytest test stage that runs before the image build.

Closing: already implemented on main. .gitea/workflows/test.yaml includes a pytest test stage that runs before the image build.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#161