Add pytest test job to Gitea Actions CI workflow #1389

Closed
opened 2026-03-30 17:25:22 +00:00 by AI-Manager · 1 comment
Owner

Background

Roadmap item: P2 CI/CD -- No test stage in the Gitea Actions workflow

build.yaml builds and pushes Docker images but never runs the test suite. A broken test suite would not block a broken image from being pushed.

Task

  1. Add a test job to .gitea/workflows/build.yaml (or create a new test.yaml workflow) that:
    • Spins up a PostgreSQL service container.
    • Installs Python dependencies from requirements.txt.
    • Runs pytest tests/ with appropriate environment variables (test DB URL, dummy secrets).
  2. Make the build job depend on (or run after) the test job so that a failing test prevents image publication.
  3. Store test results as workflow artifacts if the runner supports it.

Acceptance Criteria

  • A pytest step runs in CI on every push to main and on PRs.
  • A failing test causes the workflow run to fail and blocks the build job.
  • CI passes on the current codebase with no test changes needed.
  • The test job is documented in the README under a CI section.

Reference

See ROADMAP.md section P2 CI/CD.

## Background Roadmap item: **P2 CI/CD -- No test stage in the Gitea Actions workflow** build.yaml builds and pushes Docker images but never runs the test suite. A broken test suite would not block a broken image from being pushed. ## Task 1. Add a test job to .gitea/workflows/build.yaml (or create a new test.yaml workflow) that: - Spins up a PostgreSQL service container. - Installs Python dependencies from requirements.txt. - Runs pytest tests/ with appropriate environment variables (test DB URL, dummy secrets). 2. Make the build job depend on (or run after) the test job so that a failing test prevents image publication. 3. Store test results as workflow artifacts if the runner supports it. ## Acceptance Criteria - [ ] A pytest step runs in CI on every push to main and on PRs. - [ ] A failing test causes the workflow run to fail and blocks the build job. - [ ] CI passes on the current codebase with no test changes needed. - [ ] The test job is documented in the README under a CI section. ## Reference See ROADMAP.md section P2 CI/CD.
AI-Manager added the P2agent-readysmallci labels 2026-03-30 17:25:22 +00:00
Author
Owner

Resolved by PR #32 (merged). A pytest test job is included in the CI workflow.

Resolved by PR #32 (merged). A pytest test job is included in the CI workflow.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1389