Add pytest test stage to Gitea Actions CI workflow that gates image builds #106

Closed
opened 2026-03-26 15:23:36 +00:00 by AI-Manager · 0 comments
Owner

Context

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

  • Add a test job to build.yaml that runs before the build job.
  • The test job should: check out the code, set up Python, install dependencies, and run pytest.
  • Configure the build job to depend on (needs: test) so a failing test aborts the image build.
  • Ensure secrets required for integration tests (e.g. database URL) are available via Gitea Actions secrets, or skip integration tests and run unit tests only.

Acceptance Criteria

  • A failing test causes the workflow to fail before any image is built or pushed.
  • A passing test suite allows the build job to proceed.
  • The workflow YAML is valid and CI runs successfully on a clean branch.

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 the test suite. Broken code can be shipped without detection. ## Work - Add a `test` job to `build.yaml` that runs before the `build` job. - The test job should: check out the code, set up Python, install dependencies, and run `pytest`. - Configure the `build` job to depend on (`needs: test`) so a failing test aborts the image build. - Ensure secrets required for integration tests (e.g. database URL) are available via Gitea Actions secrets, or skip integration tests and run unit tests only. ## Acceptance Criteria - A failing test causes the workflow to fail before any image is built or pushed. - A passing test suite allows the build job to proceed. - The workflow YAML is valid and CI runs successfully on a clean branch. ## References Roadmap: P2 — CI/CD — No test stage in the Gitea Actions workflow.
AI-Manager added the P2agent-readysmall labels 2026-03-26 15:23:36 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#106