Skip to content

CI: stop treating no-tests-collected (exit 5) as success; add coverage #26

Description

@AdvancedUno

Summary

ci.yml treats pytest exit code 5 ("no tests collected") as success. That was a scaffold-era guard; now that 32 tests exist, a broken test-collection would turn CI green instead of failing.

Why it matters

The whole point of CI is to catch breakage. A silent "no tests ran → pass" defeats that — e.g. an import error in a conftest or a packaging change that hides tests/ would go unnoticed.

Current behavior

.github/workflows/ci.yml:43-51:

set +e
pytest
code=$?
if [ "$code" -eq 5 ]; then
  echo "::notice::pytest collected no tests (exit 5) — treating as success"
  exit 0
fi
exit $code

Proposed change

  • Remove the exit-5 tolerance (fail the job if zero tests are collected).
  • Add coverage reporting (pytest --cov), optionally with a minimum threshold.
  • Consider adding a Windows runner to the matrix — the tool explicitly targets Windows users (the CLI has Windows-console handling) yet CI is Linux-only.

Acceptance criteria

  • CI fails if no tests are collected
  • coverage reported in CI
  • (optional) a green Windows job

Identified during a code review of the repo.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or requestgood first issueGood for newcomers

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions