Skip to content

Reference: Testing and CI

This page documents test commands, quality gates, and CI pipelines.

Local Test Commands

Fast run

PYTHONPATH=src .venv/bin/python -m pytest -q

Coverage run

PYTHONPATH=src .venv/bin/python -m pytest --cov=src/url_monitor --cov-report=term-missing

Compile check

PYTHONPATH=src python -m compileall -q src tests

Docs strict build

.venv/bin/mkdocs build --strict

Test Surface

Current tests cover:

  • config validation and persistence behavior
  • filter manager matching/update edge cases
  • mitm addon request/response behavior
  • Qt panel regressions and state mapping
  • i18n fallback/runtime translation behavior
  • monitor worker/load scenarios

CI Workflows

ci.yml

Jobs:

  • lint: critical syntax/runtime-risk checks (flake8 selected error codes).
  • test: matrix across Linux/macOS/Windows and Python 3.11/3.12.
  • build-installers: build artifacts on macOS and Windows.
  • docs: strict MkDocs build.

docs.yml

  • Triggered on docs/mkdocs changes.
  • Builds site and deploys GitHub Pages artifact.

release-build.yml

  • Builds desktop artifacts for macOS and Windows.
  • Optional publish step for GitHub release assets.
  • Generates checksums.

infra-healthcheck.yml

  • Runs scheduled/manual public route health checks.

Legacy Workflow Note

release.yml still exists and overlaps in intent with release-build.yml.

Recommendation:

  • consolidate around release-build.yml as single release authority.

Developer Quality Checklist

Before merge/tag:

  1. Run pytest -q locally.
  2. Run docs strict build.
  3. Confirm no stale/broken links in bilingual docs.
  4. Validate monitor/proxy lifecycle manually if changed.