feat: Add GitHub Actions workflows for CI and automated PyPI publishing#14
Conversation
| @@ -0,0 +1,29 @@ | |||
| name: Python Tests | |||
There was a problem hiding this comment.
I believe this is already covered by ci.yml
There was a problem hiding this comment.
Do we want tests to run before release? Or do we trust that ci.yml ran properly?
python-test.yml is essentially called from python-release.yml.
It could have been embedded in python-release.yml.
- ci.yml is a smart gate — runs conditionally on path changes, designed for PR feedback speed
- python-test.yml is a release safety net — runs unconditionally, designed for correctness at publish time
I suggest we keep both.
There was a problem hiding this comment.
sure! could we support the same python versions?
There was a problem hiding this comment.
Done.
The rationale for the versions used in python-test.yml was that if it works with 3.13 then it must work with 3.12. But it's not guaranteed, so your comment is spot on.
I curious to know why you did not include 3.11 in the list of versions?
There was a problem hiding this comment.
My understanding at the time was that python 3.10 is still supported (security updates), but not 3.11. I just looked it up i'm completely wrong they are both in their final "security-only" support phase.
|
Generated a release (V0.1.0) |
Closes #3
What this adds
python-test.yml— runs the test suite on Python 3.10–3.13 on every release or manually.python-release.yml— triggered when a GitHub Release is published. Runs the full test matrix first, then builds and publishes the package to PyPI using Trusted Publisher (OIDC) — no API token required.How to cut a release
See the new Releasing a New Version section in
README.md.These workflows can only be fully tested after this PR is merged, because:
workflow_dispatch.MobilityData/gtfs-diff-engine, workflowpython-release.yml, environmentpypi.Recommended follow-up (requires admin): Enable branch protection on
mainto requireci.ymlstatus checks to pass before merging. This prevents a release from being cut from a brokenmain. Go to Settings → Branches → Add branch ruleset, and require thetest,lint, andmodels-freshnessjobs as required status checks.