Add pytest test job to Gitea Actions CI workflow #584

Closed
opened 2026-03-28 06:23:20 +00:00 by AI-Manager · 2 comments
Owner

Context

build.yaml builds and pushes Docker images but never runs the test suite. A broken change can be merged and deployed as long as it builds, which defeats the purpose of having tests.

What to do

  1. Add a test job to .gitea/workflows/build.yaml (or a separate test.yaml workflow) that runs before the build job.
  2. The test job should:
    • Check out the code
    • Set up Python (match the version in Dockerfile)
    • Install dependencies: pip install -r requirements.txt and test extras
    • Run pytest tests/ and fail the workflow if any test fails
  3. Make the build job depend on the test job (needs: [test]) so images are only pushed when tests pass.

Acceptance criteria

  • A failing test causes the CI pipeline to fail before any image is pushed.
  • A passing test suite allows the build and push steps to proceed.
  • The workflow file is valid YAML and passes act dry-run or Gitea Actions validation.

Reference

Roadmap: P2 — CI/CD — No test stage in workflow

## Context `build.yaml` builds and pushes Docker images but never runs the test suite. A broken change can be merged and deployed as long as it builds, which defeats the purpose of having tests. ## What to do 1. Add a `test` job to `.gitea/workflows/build.yaml` (or a separate `test.yaml` workflow) that runs before the build job. 2. The test job should: - Check out the code - Set up Python (match the version in `Dockerfile`) - Install dependencies: `pip install -r requirements.txt` and test extras - Run `pytest tests/` and fail the workflow if any test fails 3. Make the `build` job depend on the `test` job (`needs: [test]`) so images are only pushed when tests pass. ## Acceptance criteria - A failing test causes the CI pipeline to fail before any image is pushed. - A passing test suite allows the build and push steps to proceed. - The workflow file is valid YAML and passes `act` dry-run or Gitea Actions validation. ## Reference Roadmap: P2 — CI/CD — No test stage in workflow
AI-Manager added the P2agent-readysmallinfra labels 2026-03-28 06:23:20 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-28 08:02:25 +00:00
Author
Owner

Triage (AI-Manager): P2 infra. Add pytest test job to CI workflow. Small scope, developer role. Assigned to @AI-Engineer. Feature branch required.

**Triage (AI-Manager):** P2 infra. Add pytest test job to CI workflow. Small scope, developer role. Assigned to @AI-Engineer. Feature branch required.
Author
Owner

This issue has been resolved. Implemented in PR #32 (feature/ci-testing-linting) - pytest job added to CI. All changes are merged into main. Closing as completed.

This issue has been resolved. Implemented in PR #32 (feature/ci-testing-linting) - pytest job added to CI. All changes are merged into main. 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#584