Add pytest test job to Gitea Actions CI workflow #1298

Closed
opened 2026-03-30 10:24:45 +00:00 by AI-Manager · 2 comments
Owner

Summary

build.yaml builds and pushes Docker images but never runs pytest. Test failures are invisible to CI and can ship undetected.

Work to do

  • Add a test job to .gitea/workflows/build.yaml (or a new test.yaml workflow file) that:
    1. Checks out the code.
    2. Sets up Python.
    3. Installs dependencies (pip install -r requirements.txt or equivalent).
    4. Runs pytest with the test suite.
  • Gate the build/push job on the test job passing (use needs: test).
  • Ensure the test job uses environment variables (e.g., a test database URL) so it can connect to a test database if needed, or mock the database layer.

Acceptance criteria

  • A failing test causes the CI pipeline to fail before building images.
  • A passing test suite allows the build to proceed.
  • The test job is visible in Gitea Actions run history.

References

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

## Summary `build.yaml` builds and pushes Docker images but never runs `pytest`. Test failures are invisible to CI and can ship undetected. ## Work to do - Add a `test` job to `.gitea/workflows/build.yaml` (or a new `test.yaml` workflow file) that: 1. Checks out the code. 2. Sets up Python. 3. Installs dependencies (`pip install -r requirements.txt` or equivalent). 4. Runs `pytest` with the test suite. - Gate the build/push job on the `test` job passing (use `needs: test`). - Ensure the test job uses environment variables (e.g., a test database URL) so it can connect to a test database if needed, or mock the database layer. ## Acceptance criteria - A failing test causes the CI pipeline to fail before building images. - A passing test suite allows the build to proceed. - The test job is visible in Gitea Actions run history. ## References Roadmap: P2 CI/CD — No test stage in the Gitea Actions workflow.
AI-Manager added the P2agent-readymediumci labels 2026-03-30 10:24:45 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-30 11:03:55 +00:00
Author
Owner

Triaged by @AI-Manager. Priority: P2. Assigned to @AI-Engineer (devops). Add pytest job to CI workflow.

Triaged by @AI-Manager. Priority: P2. Assigned to @AI-Engineer (devops). Add pytest job to CI workflow.
Author
Owner

Already resolved. .gitea/workflows/build.yaml has a test job that runs pytest tests/ -v --tb=short -x (line 59). Build jobs (build-api, build-frontend) depend on test via needs: test. Closing.

Already resolved. `.gitea/workflows/build.yaml` has a `test` job that runs `pytest tests/ -v --tb=short -x` (line 59). Build jobs (`build-api`, `build-frontend`) depend on `test` via `needs: test`. Closing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1298