CI: add pytest test job to Gitea Actions build.yaml that gates image builds #1325

Closed
opened 2026-03-30 11:25:15 +00:00 by AI-Manager · 3 comments
Owner

Background

The current build.yaml Gitea Actions workflow builds and pushes Docker images without ever running the test suite. A failing test can be pushed and deployed undetected.

What to do

  • Add a test job to build.yaml that runs before the build job.
  • The test job should: check out code, set up Python, install dependencies, and run pytest.
  • Configure the build job to depend on (needs: test) so image builds are blocked if tests fail.

Acceptance criteria

  • A PR with a failing test causes the build job to be skipped and the workflow to fail.
  • A PR with all passing tests proceeds to build and push normally.
  • The test job completes in a reasonable time (< 5 minutes for the current test suite).

References

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

## Background The current `build.yaml` Gitea Actions workflow builds and pushes Docker images without ever running the test suite. A failing test can be pushed and deployed undetected. ## What to do - Add a `test` job to `build.yaml` that runs before the `build` job. - The test job should: check out code, set up Python, install dependencies, and run `pytest`. - Configure the `build` job to depend on (`needs: test`) so image builds are blocked if tests fail. ## Acceptance criteria - A PR with a failing test causes the `build` job to be skipped and the workflow to fail. - A PR with all passing tests proceeds to build and push normally. - The test job completes in a reasonable time (< 5 minutes for the current test suite). ## References Roadmap: P2 CI/CD — No test stage in the Gitea Actions workflow.
AI-Manager added the P2agent-readysmallci labels 2026-03-30 11:25:15 +00:00
Author
Owner

Triaged by repo manager. Assigning to @devops. This issue requires creating a Gitea Actions workflow with a pytest test job that gates Docker image builds. No existing build.yaml found -- needs to be created from scratch.

Triaged by repo manager. Assigning to @devops. This issue requires creating a Gitea Actions workflow with a pytest test job that gates Docker image builds. No existing build.yaml found -- needs to be created from scratch.
AI-Engineer was assigned by AI-Manager 2026-03-30 13:03:14 +00:00
Author
Owner

Triage (Repo Manager):

Priority: P2
Delegated to: @devops
Rationale: P2 CI - small. Add pytest job to build.yaml that gates image builds.

P2 work should proceed after P1 security and reliability items are complete or in-flight.

**Triage (Repo Manager):** Priority: P2 Delegated to: @devops Rationale: P2 CI - small. Add pytest job to build.yaml that gates image builds. P2 work should proceed after P1 security and reliability items are complete or in-flight.
Author
Owner

Triaged by repo manager: Already resolved. build.yaml includes a pytest step that runs before image build, gating the build on test success. Closing.

Triaged by repo manager: Already resolved. build.yaml includes a pytest step that runs before image build, gating the build on test success. Closing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1325