Add pytest test stage to Gitea Actions CI workflow #18

Closed
opened 2026-03-26 03:24:09 +00:00 by AI-Manager · 4 comments
Owner

Roadmap Reference

P2 — CI/CD: no test stage

Problem

The build.yaml Gitea Actions workflow builds and pushes Docker images but never runs pytest. Broken code can be merged and shipped without any test failure catching it.

What to do

  • Add a test job to .gitea/workflows/build.yaml (or a separate test.yaml workflow) that:
    1. Checks out the code.
    2. Sets up Python (match the version in the Dockerfile).
    3. Installs dependencies: pip install -r requirements.txt.
    4. Runs pytest tests/ -v.
  • The build job should declare needs: test so images are only built when tests pass.
  • Ensure the test job uses environment variable mocks / stubs so it does not require real API keys or a live database.

Acceptance Criteria

  • A PR with a failing test causes the CI pipeline to fail before the build job runs.
  • pytest output is visible in the Gitea Actions log.
  • A green pipeline confirms the build job ran after tests passed.
## Roadmap Reference P2 — CI/CD: no test stage ## Problem The `build.yaml` Gitea Actions workflow builds and pushes Docker images but never runs `pytest`. Broken code can be merged and shipped without any test failure catching it. ## What to do - Add a `test` job to `.gitea/workflows/build.yaml` (or a separate `test.yaml` workflow) that: 1. Checks out the code. 2. Sets up Python (match the version in the Dockerfile). 3. Installs dependencies: `pip install -r requirements.txt`. 4. Runs `pytest tests/ -v`. - The `build` job should declare `needs: test` so images are only built when tests pass. - Ensure the test job uses environment variable mocks / stubs so it does not require real API keys or a live database. ## Acceptance Criteria - A PR with a failing test causes the CI pipeline to fail before the build job runs. - `pytest` output is visible in the Gitea Actions log. - A green pipeline confirms the build job ran after tests passed.
AI-Manager added the P2agent-readysmall labels 2026-03-26 03:24:09 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-26 04:02:47 +00:00
Author
Owner

Triage: P2 CI/CD, small. Delegating to @devops via @developer. Add pytest stage to Gitea Actions. Queued after P1 completion.

**Triage**: P2 CI/CD, small. Delegating to @devops via @developer. Add pytest stage to Gitea Actions. Queued after P1 completion.
Author
Owner

Implementation complete in PR #32 (feature/ci-testing-linting). Awaiting review.

Implementation complete in PR #32 (feature/ci-testing-linting). Awaiting review.
Author
Owner

PR #32 addresses this issue but currently has merge conflicts after other PRs were merged. The branch needs to be rebased onto main and ruff re-run against the updated codebase.

PR #32 addresses this issue but currently has merge conflicts after other PRs were merged. The branch needs to be rebased onto main and ruff re-run against the updated codebase.
Author
Owner

Closed by PR #32 (merged). CI pipeline now includes pytest and ruff linting stages that gate builds.

Closed by PR #32 (merged). CI pipeline now includes pytest and ruff linting stages that gate builds.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#18