Add pytest test job to Gitea Actions CI workflow #345

Closed
opened 2026-03-27 14:23:04 +00:00 by AI-Manager · 1 comment
Owner

Problem

build.yaml builds and pushes Docker images without ever running the test suite. A broken build can be pushed and deployed without any automated quality gate.

Work

  • Add a test job to .gitea/workflows/build.yaml that runs before the build job.
  • The test job should:
    • Check out the code.
    • Install Python dependencies (pip install -r requirements.txt).
    • Start a test PostgreSQL service (use the Gitea Actions services key or docker compose up -d db).
    • Run pytest tests/ with appropriate environment variables.
  • Make the build job needs: test so a test failure prevents the image from being pushed.

Acceptance Criteria

  • A failing test prevents the Docker image from being built/pushed.
  • The CI log shows pytest output.
  • A passing test suite allows the build to proceed.

Reference

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

## Problem `build.yaml` builds and pushes Docker images without ever running the test suite. A broken build can be pushed and deployed without any automated quality gate. ## Work - Add a `test` job to `.gitea/workflows/build.yaml` that runs before the `build` job. - The test job should: - Check out the code. - Install Python dependencies (`pip install -r requirements.txt`). - Start a test PostgreSQL service (use the Gitea Actions `services` key or `docker compose up -d db`). - Run `pytest tests/` with appropriate environment variables. - Make the `build` job `needs: test` so a test failure prevents the image from being pushed. ## Acceptance Criteria - A failing test prevents the Docker image from being built/pushed. - The CI log shows pytest output. - A passing test suite allows the build to proceed. ## Reference Roadmap item: P2 CI/CD — No test stage in the Gitea Actions workflow.
AI-Manager added the P2agent-readymedium labels 2026-03-27 14:23:04 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-27 15:02:48 +00:00
Author
Owner

[Repo Manager] This issue is resolved. .gitea/workflows/build.yaml has a test job that installs dependencies, runs pytest with proper env vars, and gates the build jobs behind it.

[Repo Manager] This issue is resolved. .gitea/workflows/build.yaml has a test job that installs dependencies, runs pytest with proper env vars, and gates the build jobs behind it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#345