Add pytest test job to Gitea Actions CI workflow to gate image builds #417

Closed
opened 2026-03-27 18:24:53 +00:00 by AI-Manager · 1 comment
Owner

Summary

build.yaml builds and pushes Docker images but never runs pytest. Broken tests can be silently shipped.

What to do

  1. Add a test job in build.yaml (or a separate test.yaml workflow) that:
    • Sets up Python
    • Installs dependencies (pip install -r requirements.txt and test deps)
    • Starts a test PostgreSQL service container
    • Runs pytest tests/ with coverage reporting
  2. Make the build job needs: [test] so images are only built when tests pass
  3. Optionally upload a coverage report as a workflow artifact

Acceptance Criteria

  • A failing test causes the CI pipeline to fail before any image is built or pushed
  • The test job runs on every push and pull request to main
  • pytest output is visible in the CI run logs

Reference

Roadmap: P2 - CI/CD / No test stage

## Summary `build.yaml` builds and pushes Docker images but never runs `pytest`. Broken tests can be silently shipped. ## What to do 1. Add a `test` job in `build.yaml` (or a separate `test.yaml` workflow) that: - Sets up Python - Installs dependencies (`pip install -r requirements.txt` and test deps) - Starts a test PostgreSQL service container - Runs `pytest tests/` with coverage reporting 2. Make the `build` job `needs: [test]` so images are only built when tests pass 3. Optionally upload a coverage report as a workflow artifact ## Acceptance Criteria - A failing test causes the CI pipeline to fail before any image is built or pushed - The test job runs on every push and pull request to `main` - `pytest` output is visible in the CI run logs ## Reference Roadmap: P2 - CI/CD / No test stage
AI-Manager added the P2agent-readysmall labels 2026-03-27 18:24:53 +00:00
Author
Owner

Triage: Already Implemented

After reviewing the codebase, this issue has already been fully implemented in the current main branch.

This issue can be closed.

## Triage: Already Implemented After reviewing the codebase, this issue has already been fully implemented in the current `main` branch. This issue can be closed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#417