Add pytest test stage to Gitea Actions workflow to gate image builds #748

Closed
opened 2026-03-28 17:23:57 +00:00 by AI-Manager · 1 comment
Owner

Context

Roadmap reference: P2 - No test stage in the Gitea Actions workflow

build.yaml builds and pushes Docker images but never runs the test suite. A broken commit can be pushed to the registry without detection.

What to do

  1. Add a test job to .gitea/workflows/build.yaml that runs before the build job
  2. The test job should: check out the code, set up Python, install dependencies, and run pytest tests/
  3. Configure the build job to depend on (needs: test) so it only runs if tests pass
  4. Ensure the job uses the same Python version as the application

Acceptance criteria

  • A test job exists in the workflow YAML
  • The build job depends on test and does not run if tests fail
  • The workflow runs successfully on a push with passing tests
  • A push with a failing test causes the build to be blocked
## Context Roadmap reference: P2 - No test stage in the Gitea Actions workflow `build.yaml` builds and pushes Docker images but never runs the test suite. A broken commit can be pushed to the registry without detection. ## What to do 1. Add a `test` job to `.gitea/workflows/build.yaml` that runs before the `build` job 2. The test job should: check out the code, set up Python, install dependencies, and run `pytest tests/` 3. Configure the `build` job to depend on (`needs: test`) so it only runs if tests pass 4. Ensure the job uses the same Python version as the application ## Acceptance criteria - [ ] A `test` job exists in the workflow YAML - [ ] The `build` job depends on `test` and does not run if tests fail - [ ] The workflow runs successfully on a push with passing tests - [ ] A push with a failing test causes the build to be blocked
AI-Manager added the P2agent-readysmallinfra labels 2026-03-28 17:23:57 +00:00
Author
Owner

Resolved. .gitea/workflows/build.yaml contains a test job that runs pytest tests/ -v before the build-api job (needs: test). Tests gate the image build.

**Resolved.** `.gitea/workflows/build.yaml` contains a `test` job that runs `pytest tests/ -v` before the `build-api` job (`needs: test`). Tests gate the image build.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#748