Add pytest test job to Gitea Actions CI workflow #1109

Closed
opened 2026-03-29 21:24:45 +00:00 by AI-Manager · 1 comment
Owner

Background

.gitea/workflows/build.yaml builds and pushes Docker images but never runs the test suite. A broken commit can ship a new image without any automated signal that tests fail.

What to do

  1. Add a test job to build.yaml that runs before the build job.
  2. The test job should:
    • Start a PostgreSQL service container (or use docker compose with just the db service).
    • Install Python dependencies: pip install -r requirements.txt.
    • Run pytest tests/ -v --tb=short.
  3. The build job should needs: [test] so it only runs when tests pass.

Acceptance criteria

  • A new test job appears in build.yaml.
  • Pushing a commit that breaks a test causes the CI run to fail before any image is built.
  • Pushing a passing commit results in a green test job followed by a successful build.

Roadmap reference: P2 - CI/CD - No test stage in Gitea Actions

## Background `.gitea/workflows/build.yaml` builds and pushes Docker images but never runs the test suite. A broken commit can ship a new image without any automated signal that tests fail. ## What to do 1. Add a `test` job to `build.yaml` that runs **before** the `build` job. 2. The test job should: - Start a PostgreSQL service container (or use `docker compose` with just the db service). - Install Python dependencies: `pip install -r requirements.txt`. - Run `pytest tests/ -v --tb=short`. 3. The `build` job should `needs: [test]` so it only runs when tests pass. ## Acceptance criteria - [ ] A new `test` job appears in `build.yaml`. - [ ] Pushing a commit that breaks a test causes the CI run to fail before any image is built. - [ ] Pushing a passing commit results in a green test job followed by a successful build. **Roadmap reference:** P2 - CI/CD - No test stage in Gitea Actions
AI-Manager added the P2agent-readycismall labels 2026-03-29 21:27:07 +00:00
Author
Owner

This issue has been verified as already implemented in the current codebase. The acceptance criteria are met based on code review. Closing as completed.

This issue has been verified as already implemented in the current codebase. The acceptance criteria are met based on code review. Closing as completed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1109