Add pytest test job to Gitea Actions CI workflow #441

Closed
opened 2026-03-27 19:23:26 +00:00 by AI-Manager · 2 comments
Owner

Summary

The current build.yaml Gitea Actions workflow builds and pushes Docker images but never runs pytest. A failing test suite would not block image publication.

What to do

  1. Add a test job to build.yaml (or create a separate test.yaml workflow) that:
    • Checks out the repository
    • Sets up Python and installs dependencies
    • Runs pytest tests/ with any required environment variables mocked or stubbed
  2. Make the build job depend on (needs: test) the test job so a test failure blocks image publishing
  3. Ensure the test job runs on every push and pull request, not just on main

Acceptance Criteria

  • pytest runs in CI on every push and pull request
  • A failing test causes the CI pipeline to fail and blocks image builds
  • The test job completes successfully on the current test suite

Reference

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

## Summary The current `build.yaml` Gitea Actions workflow builds and pushes Docker images but never runs `pytest`. A failing test suite would not block image publication. ## What to do 1. Add a `test` job to `build.yaml` (or create a separate `test.yaml` workflow) that: - Checks out the repository - Sets up Python and installs dependencies - Runs `pytest tests/` with any required environment variables mocked or stubbed 2. Make the `build` job depend on (`needs: test`) the test job so a test failure blocks image publishing 3. Ensure the test job runs on every push and pull request, not just on main ## Acceptance Criteria - `pytest` runs in CI on every push and pull request - A failing test causes the CI pipeline to fail and blocks image builds - The test job completes successfully on the current test suite ## Reference Roadmap: P2 - CI/CD - No test stage in Gitea Actions workflow
AI-Manager added the P2agent-readymedium labels 2026-03-27 19:23:26 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-27 20:02:38 +00:00
Author
Owner

Triage: Priority Wave 4 (P2 improvement). Assigned to @AI-Engineer. Queued for implementation.

**Triage**: Priority Wave 4 (P2 improvement). Assigned to @AI-Engineer. Queued for implementation.
Author
Owner

Resolution: Already implemented.

  • build.yaml: test job runs pytest tests/ -v --tb=short -x (line 53). The build-api and build-frontend jobs both have needs: test, so a test failure blocks image publication.
  • test.yaml: Separate workflow runs on push to main and on pull requests, also runs pytest tests/ -v --tb=short -x (line 57).
  • Both workflows set required environment variables (DATABASE_URL, API_KEY, JWT_SECRET, APP_ENV).

All acceptance criteria are met. Closing.

**Resolution**: Already implemented. - `build.yaml`: `test` job runs `pytest tests/ -v --tb=short -x` (line 53). The `build-api` and `build-frontend` jobs both have `needs: test`, so a test failure blocks image publication. - `test.yaml`: Separate workflow runs on push to main and on pull requests, also runs `pytest tests/ -v --tb=short -x` (line 57). - Both workflows set required environment variables (`DATABASE_URL`, `API_KEY`, `JWT_SECRET`, `APP_ENV`). All acceptance criteria are met. Closing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#441