Skip to content

Run tests in CI and before publishing - #16

Merged
OnFreund merged 2 commits into
mainfrom
claude/add-test-ci
Oct 10, 2026
Merged

OnFreund merged 2 commits into
mainfrom
claude/add-test-ci

Conversation

@OnFreund

@OnFreund OnFreund commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Why

There was no CI for tests. The only workflow, publish.yml, built and uploaded to PyPI on a version bump without running the test suite. The test dependencies (pytest, pytest-asyncio) also weren't declared anywhere, so a plain pip install -e . followed by pytest didn't work.

Changes

  • .github/workflows/test.yml (new): runs pytest on the latest stable Python (3.x) for every pull request and every push to main. It also has a workflow_call trigger so other workflows can reuse it.
  • publish.yml: adds a test job that calls test.yml. The publish job now has needs: test, so a failing test blocks the release.
  • pyproject.toml: adds a test optional-dependency extra listing pytest>=8.0 and pytest-asyncio>=0.23.
  • README: the development setup now uses pip install -e ".[test]".

Notes for reviewers

  • In publish.yml, the tests now run on every push to main that changes pyproject.toml, even when the version didn't change and nothing gets published. That costs a little CI time but avoids complicating the workflow.
  • Testing: all 25 tests on main pass in a fresh virtualenv set up with only pip install -e ".[test]". This PR's own checks should be the first real run of the workflow.
  • Once this merges, Include MTA Bus Company static GTFS feed for bus routes #15 will get test runs too after it's rebased or updated.

🤖 Generated with Claude Code

OnFreund and others added 2 commits October 10, 2026 17:31
Add a test workflow that runs pytest on Python 3.11-3.13 for every PR
and push to main, and make the publish workflow depend on it so a
release can't go out with failing tests. Declare pytest and
pytest-asyncio as a `test` extra so the suite can be installed with
`pip install -e ".[test]"`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@OnFreund
OnFreund merged commit 930917b into main Oct 10, 2026
1 check passed
@OnFreund
OnFreund deleted the claude/add-test-ci branch October 10, 2026 14:36
@OnFreund OnFreund mentioned this pull request Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant