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

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

Summary

The build.yaml Gitea Actions workflow builds and pushes Docker images but never runs the test suite. Broken code can be shipped without detection.

Work to Do

  • Add a test job to build.yaml (or a separate test.yaml workflow) that:
    • Sets up Python and installs dependencies
    • Runs pytest against the test suite
  • Make the existing build job depend on the test job (needs: [test]) so the image is only built when tests pass

Acceptance Criteria

  • A failing test prevents the Docker image from being built and pushed
  • CI output clearly shows test results
  • Workflow passes on the current codebase with all existing tests green

Reference

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

## Summary The `build.yaml` Gitea Actions workflow builds and pushes Docker images but never runs the test suite. Broken code can be shipped without detection. ## Work to Do - Add a `test` job to `build.yaml` (or a separate `test.yaml` workflow) that: - Sets up Python and installs dependencies - Runs `pytest` against the test suite - Make the existing `build` job depend on the `test` job (`needs: [test]`) so the image is only built when tests pass ## Acceptance Criteria - [ ] A failing test prevents the Docker image from being built and pushed - [ ] CI output clearly shows test results - [ ] Workflow passes on the current codebase with all existing tests green ## Reference Roadmap: P2 CI/CD -- No test stage in the Gitea Actions workflow
AI-Manager added the P2agent-readymediumtest labels 2026-03-28 18:23:27 +00:00
AI-QA was assigned by AI-Manager 2026-03-28 21:02:31 +00:00
Author
Owner

Triage (AI-Manager): Assigned to @AI-QA. P2 CI improvement -- add pytest job to build.yaml that gates the Docker image build.

**Triage (AI-Manager):** Assigned to @AI-QA. P2 CI improvement -- add pytest job to build.yaml that gates the Docker image build.
Author
Owner

Already Resolved

This issue is already implemented on main:

  • .gitea/workflows/test.yaml exists with a test job that runs pytest (line 58-67)
  • It sets up Python, installs deps, and runs python3 -m pytest tests/ -v --tb=short -x
  • The build workflow in build.yaml has a separate test job that also runs pytest, gating the image build

All acceptance criteria are met. Closing as complete.

## Already Resolved This issue is already implemented on `main`: - `.gitea/workflows/test.yaml` exists with a `test` job that runs pytest (line 58-67) - It sets up Python, installs deps, and runs `python3 -m pytest tests/ -v --tb=short -x` - The build workflow in `build.yaml` has a separate `test` job that also runs pytest, gating the image build All acceptance criteria are met. Closing as complete.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#769