update steering docs and hooks for current project state
This commit is contained in:
@@ -1,16 +1,21 @@
|
||||
---
|
||||
name: Run Tests on Save
|
||||
description: Automatically run relevant tests when a Python service file is saved
|
||||
version: "1.0"
|
||||
description: Run relevant tests when service or frontend files are saved
|
||||
version: "2.0"
|
||||
trigger:
|
||||
type: onSave
|
||||
filePattern: "services/**/*.py"
|
||||
filePattern: "{services/**/*.py,frontend/src/**/*.{ts,tsx}}"
|
||||
---
|
||||
|
||||
When a Python file under `services/` is saved:
|
||||
When a file is saved:
|
||||
|
||||
1. Identify which service module was modified (e.g. `services/ingestion/worker.py` → `ingestion`)
|
||||
2. Look for corresponding tests in `tests/` matching the service name
|
||||
3. Run `pytest tests/test_{service_name}*.py -x --tb=short -q` if test files exist
|
||||
4. If no specific test file exists, run `ruff check` on the modified file to catch syntax/lint issues
|
||||
5. Report results concisely — only show failures or a one-line success confirmation
|
||||
1. If it's a Python file under `services/`:
|
||||
- Identify the service module (e.g. `services/ingestion/worker.py` → `ingestion`)
|
||||
- Look for corresponding tests in `tests/` matching the service name
|
||||
- Run `python -m pytest tests/test_{service_name}*.py -x --tb=short -q` if test files exist
|
||||
- If no specific test file exists, run lint check only
|
||||
- Report results concisely
|
||||
|
||||
2. If it's a TypeScript/React file under `frontend/src/`:
|
||||
- Run `npx vitest --run` from the `frontend/` directory
|
||||
- Report results concisely — only show failures or a one-line success
|
||||
|
||||
Reference in New Issue
Block a user