Skip to content

[static] CI never runs the unittest suite #20

Description

@tiankaima

Problem

The repo has a real test suite — 30 unittest tests across tests/test_auth.py, tests/test_curriculum.py, tests/test_sqlite_store.py, tests/test_young.py, covering the cache-completeness logic that PR #17 added — but no workflow ever runs them:

  • .github/workflows/ruff.yml only runs ruff check.
  • .github/workflows/build.yml runs main.py against production upstreams; it never touches tests/.

So a PR that breaks the tests (or adds a regression the tests were written to catch, e.g. the JW chunk-completeness rules) merges green as long as lint passes and the one daily production build happens to succeed.

Verified locally with the repo venv: python -m unittest discover -s testsRan 30 tests … OK (0.05s, no network needed — they use :memory: SQLite and httpx.MockTransport).

Suggested fix

Add a test job (or extend ruff.yml) along these lines:

      - name: Run tests
        run: uv run python -m unittest discover -s tests -p 'test_*.py'

uv sync --group dev already happens in ruff.yml; unittest is stdlib so no new dependency is required. Optionally add pytest/coverage later, but the stdlib runner is enough today.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions