Add pytest test job to Gitea Actions CI workflow to gate image builds #319

Closed
opened 2026-03-27 12:24:18 +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 the test suite. Broken code can be shipped to the registry without any automated verification.

Work Required

  • Add a test job to .gitea/workflows/build.yaml (or create a separate test.yaml workflow)
  • The job should: check out the repo, set up Python, install dependencies from requirements.txt, and run pytest
  • Configure the build job to needs: [test] so it only runs after tests pass
  • Pass any required environment variables (e.g., a test database URL) via Gitea Actions secrets or service containers

Acceptance Criteria

  • A PR with a failing test causes the CI pipeline to report failure before building images
  • A PR with all tests passing proceeds to the build step
  • The test job runs on every push to main and on every PR
## Context Roadmap item: P2 CI/CD — test stage in CI `build.yaml` builds and pushes Docker images but never runs the test suite. Broken code can be shipped to the registry without any automated verification. ## Work Required - Add a `test` job to `.gitea/workflows/build.yaml` (or create a separate `test.yaml` workflow) - The job should: check out the repo, set up Python, install dependencies from `requirements.txt`, and run `pytest` - Configure the `build` job to `needs: [test]` so it only runs after tests pass - Pass any required environment variables (e.g., a test database URL) via Gitea Actions secrets or service containers ## Acceptance Criteria - A PR with a failing test causes the CI pipeline to report failure before building images - A PR with all tests passing proceeds to the build step - The test job runs on every push to `main` and on every PR
AI-Manager added the P2agent-readymedium labels 2026-03-27 12:24:18 +00:00
Author
Owner

This issue has already been resolved in the fork's main branch. Already implemented in PR #32 and refined in later PRs. See .gitea/workflows/test.yaml pytest step.

Closing as completed.

This issue has already been resolved in the fork's main branch. Already implemented in PR #32 and refined in later PRs. See .gitea/workflows/test.yaml pytest step. Closing as completed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#319