4.0 KiB
| title | type | status | date |
|---|---|---|---|
| fix: CI test workflow references missing requirements.txt | fix | active | 2026-04-24 |
Fix: CI Test Workflow
Overview
The scheduled CI workflow .github/workflows/mindmodel-schedule.yml attempts pip install -r requirements.txt, but this file does not exist. The project uses uv with pyproject.toml and uv.lock. This workflow fails silently (|| true) and never actually runs tests meaningfully.
Problem Frame
- Python 3.11 is hardcoded in the workflow; the project requires >=3.13
requirements.txtis missing; dependencies are inpyproject.toml- No pytest gate on push/PR — regressions are only caught locally
- The mindmodel validator runs regardless, masking the test failure
Requirements Trace
- R1. CI must install dependencies correctly using the project's package manager
- R2. CI must run pytest on push and PR to main
- R3. CI must use Python >=3.13 matching pyproject.toml
- R4. CI must fail visibly when tests fail (no
|| truemasking)
Scope Boundaries
Included:
- Fix existing mindmodel-schedule.yml
- Add new pytest workflow for push/PR
Excluded:
- Changing test code or test dependencies
- Adding new tests
- Changing the mindmodel validator logic
Key Technical Decisions
- Use
uvin CI — matches local development and pyproject.toml. Useastral-sh/setup-uvaction. - Separate workflows — keep mindmodel schedule weekly, add pytest on push/PR
- Fail fast — remove
|| truefrom pytest step
Implementation Units
- U1. Fix mindmodel-schedule.yml to use uv
Goal: Make the scheduled workflow install deps and run tests correctly.
Requirements: R1, R3, R4
Dependencies: None
Files:
- Modify:
.github/workflows/mindmodel-schedule.yml
Approach:
- Replace
actions/setup-python@v4+pip installwithastral-sh/setup-uv@v5 - Use
uv syncto install frompyproject.toml/uv.lock - Change Python version to 3.13
- Remove
|| truefrom pytest step - Keep mindmodel validator as-is
Execution note: Test-first — write a workflow validation test that checks the YAML parses correctly and references valid files.
Test scenarios:
- Happy path: Workflow YAML is valid GitHub Actions syntax
- Error path: pytest step fails if tests fail (no
|| true) - Integration:
uv syncinstalls the same lockfile as local dev
Verification:
python -c "import yaml; yaml.safe_load(open('.github/workflows/mindmodel-schedule.yml'))"passes- Workflow runs successfully on next schedule trigger
- U2. Add pytest workflow for push/PR
Goal: Run tests on every push and PR to main.
Requirements: R2, R3, R4
Dependencies: None
Files:
- Create:
.github/workflows/pytest.yml
Approach:
- Trigger on
pushtomainandpull_requesttomain - Use
astral-sh/setup-uv@v5with Python 3.13 - Run
uv run pytest tests/ -q - Cache uv dependencies between runs
Execution note: Test-first — write a test that verifies the new workflow file exists and has required fields.
Test scenarios:
- Happy path: Workflow triggers on push to main
- Happy path: Workflow triggers on PR to main
- Error path: pytest fails → workflow fails
- Edge case: Caching speeds up repeated runs
Verification:
- New workflow appears in repo Actions tab
- Pushing this plan branch triggers the workflow
- All tests pass in CI
Risks & Dependencies
| Risk | Mitigation |
|---|---|
| uv action not available or fails | Pin to known good version; test on fork first |
| Tests fail in CI but pass locally | Likely env difference; debug in CI logs |
| Gitea runner differences | Use standard ubuntu-latest; no Gitea-specific actions |
Documentation / Operational Notes
- Update ARCHITECTURE.md CI section if it mentions the old workflow
- Note in AGENTS.md that CI runs on GitHub Actions (not Gitea CI)
Sources & References
- Existing workflow:
.github/workflows/mindmodel-schedule.yml - Package manager:
pyproject.toml,uv.lock - uv GitHub Action: https://github.com/astral-sh/setup-uv