ci: add CI workflow to run tests and mypy on push/PR#9
Merged
Conversation
No workflow currently validates changes before merge or before the tag-triggered PyPI publish. Adds a CI workflow modeled on the fleet's python-tesla-fleet-api/aiopowerwall CI: uv-based install, mypy typecheck (already configured in pyproject, run via an ephemeral uv --with install since no dev dependency group exists), and the test suite across the Python versions declared by requires-python (3.9-3.13).
Records the non-obvious facts discovered while bootstrapping CI: tests are plain scripts (pytest would collect zero tests), and mypy has a pyproject config but no dev-dependency group to install it from.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
python-publish.yml) ships with zero validation gate..github/workflows/ci.ymlrunning onpush+pull_request.python-tesla-fleet-api,aiopowerwall):astral-sh/setup-uv,uv sync, matrix test job.uv sync(repo already usesuv.lock).mypyis already configured via[tool.mypy]inpyproject.tomlbut isn't declared as a dependency anywhere (no dev dependency group exists). Ran viauv run --with mypy mypy teslemetry_stream(ephemeral install) rather than adding a dev-dependency group, to avoid touching tooling config in a CI-bootstrap PR.tests/test_field_type_coercion.pyis a plain script (if __name__ == "__main__"), not pytest-based - pytest would collect zero tests here since none of its functions aretest_-prefixed. CI runs eachtests/test_*.pydirectly viauv run python, matching the repo's actual test convention.3.9-3.13, matchingrequires-python = ">=3.9"(no classifiers narrow this further).python-publish.yml/ the publish path is untouched. Wiring CI as a required gate before publish is a possible follow-up.Testing
uv sync,uv run --with mypy mypy teslemetry_stream(passes, one pre-existing warning that mypy no longer supports thepython_version = "3.9"target in[tool.mypy]- unrelated to this PR, not fixed here since it's a tooling-config change), anduv run python tests/test_field_type_coercion.py(all checks pass).Full narrative / original brief
E10.1 follow-up, from the fleet CI audit. Top finding for this repo: tests and pyproject exist but NO CI workflow runs them - the repo publishes to PyPI on tag with zero validation gate. Scope: add
.github/workflows/ci.ymlrunning on push + PR, matching the repo's tooling (uv), only add lint/typecheck if already configured (no new tool configs), Python matrix matchingrequires-python, modeled onpython-tesla-fleet-api/aiopowerwallCI. Do not touchpython-publish.ymlin this PR.