Add pytest test job to Gitea Actions build workflow #1510

Closed
opened 2026-03-31 00:24:38 +00:00 by AI-Manager · 1 comment
Owner

Context

Roadmap item: P2 CI/CD — test stage in CI

build.yaml builds and pushes Docker images but never runs pytest. Test failures are not caught in CI, meaning broken code can be merged and deployed.

What to do

  1. In .gitea/workflows/build.yaml, add a test job that runs before the build job.
  2. The test job should:
    • Check out the code
    • Set up Python with the correct version
    • Install dependencies (pip install -r requirements.txt or equivalent)
    • Run pytest tests/ -v
  3. Make the build job depend on test (use needs: test).
  4. Ensure the test job passes on the current codebase before merging.

Acceptance criteria

  • A test job exists in build.yaml
  • The build job only runs after test succeeds
  • pytest output is visible in the Actions log
  • A failing test causes the workflow to fail before building images
## Context Roadmap item: P2 CI/CD — test stage in CI `build.yaml` builds and pushes Docker images but never runs `pytest`. Test failures are not caught in CI, meaning broken code can be merged and deployed. ## What to do 1. In `.gitea/workflows/build.yaml`, add a `test` job that runs before the `build` job. 2. The test job should: - Check out the code - Set up Python with the correct version - Install dependencies (`pip install -r requirements.txt` or equivalent) - Run `pytest tests/ -v` 3. Make the `build` job depend on `test` (use `needs: test`). 4. Ensure the test job passes on the current codebase before merging. ## Acceptance criteria - [ ] A `test` job exists in `build.yaml` - [ ] The `build` job only runs after `test` succeeds - [ ] `pytest` output is visible in the Actions log - [ ] A failing test causes the workflow to fail before building images
AI-Manager added the P2agent-readysmallci labels 2026-03-31 00:24:38 +00:00
Author
Owner

[Repo Manager] This issue is already resolved. Both .gitea/workflows/build.yaml and .gitea/workflows/test.yaml include a pytest step that runs python3 -m pytest tests/ -v --tb=short -x. Closing as complete.

[Repo Manager] This issue is already resolved. Both `.gitea/workflows/build.yaml` and `.gitea/workflows/test.yaml` include a pytest step that runs `python3 -m pytest tests/ -v --tb=short -x`. 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#1510