Skip to content

Add offline CI pytest suite and improve testing documentation#17

Merged
taruma merged 3 commits intov2.0from
v2.0-test
Mar 19, 2026
Merged

Add offline CI pytest suite and improve testing documentation#17
taruma merged 3 commits intov2.0from
v2.0-test

Conversation

@taruma
Copy link
Copy Markdown
Owner

@taruma taruma commented Mar 19, 2026

No description provided.

taruma added 3 commits March 19, 2026 21:08
Introduce a lightweight regression testing framework with offline-by-default coverage to reduce feature-change breakage.

- Add a new GitHub Actions workflow (`tests.yml`) to run pytest on PRs and pushes to `main` using `uv`.
- Document the testing approach in `docs/TESTING.md`, including test layers, principles, and live-test gating.
- Update `README.md` with quick-start test commands and explicit opt-in instructions for live provider smoke tests.
- Add tests for LLM streaming fallback behavior and guarded live API smoke validation.

This establishes deterministic CI checks while keeping real-provider tests optional and local-only.
Add local `.env` auto-loading in `tests/conftest.py` so live-test flags
and provider overrides are picked up without manual export steps.

Introduce a `--live` pytest option that switches marker selection to
`live`, replacing the previous `-o addopts=...` workaround and making
live smoke runs simpler and clearer.

Update `.env.example`, `README.md`, and `docs/TESTING.md` to document:
- explicit opt-in via `FRAMELAB_ENABLE_LIVE_TESTS=1`
- optional `TEST_PROVIDER/TEST_MODEL/TEST_BASE_URL/TEST_API_KEY` overrides
- the new `uv run pytest --live` command for local live runs
Update `test_analyze_without_media_shows_error` to allow any of several
expected validation messages (missing media, API key, or model name)
instead of asserting only the missing-media error. This makes the smoke
test robust to validation order and differing first-failure paths.
@taruma taruma merged commit c0ec72d into v2.0 Mar 19, 2026
1 check passed
@taruma taruma deleted the v2.0-test branch March 19, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant