Skip to content

ci: run python unit tests on push and PR - #15

Merged
michaeloboyle merged 1 commit into
mainfrom
feature/ci-python-tests
Jun 7, 2026
Merged

ci: run python unit tests on push and PR#15
michaeloboyle merged 1 commit into
mainfrom
feature/ci-python-tests

Conversation

@michaeloboyle

Copy link
Copy Markdown
Owner

Adds a GitHub Actions workflow (.github/workflows/test.yml) that runs the Python unit tests on every push to main and on every PR.

  • Uses python -m unittest discover -s tests -p "test_*.py", so any future tests/test_*.py is picked up automatically (not just the current test_analysis_cache.py).
  • serve.py and the tests are stdlib-only, so there's no dependency install step — checkout, set up Python 3.13, run.

Closes the gap from #14: the negative-cache gate logic is now guarded automatically instead of only on manual invocation.

Verified locally — the exact CI command passes:

python -m unittest discover -s tests -p "test_*.py" -v
Ran 6 tests in 0.003s — OK

🤖 Generated with Claude Code

No test runner existed in CI (only GitGuardian secret scanning), so
tests/test_analysis_cache.py ran only when invoked by hand. Add a
GitHub Actions job that runs 'unittest discover' on tests/test_*.py.
serve.py and the tests are stdlib-only, so no dependency install step.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 7, 2026 14:45
@michaeloboyle
michaeloboyle merged commit a16a52e into main Jun 7, 2026
3 checks passed
@michaeloboyle
michaeloboyle deleted the feature/ci-python-tests branch June 7, 2026 14:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds automated Python unit test execution via GitHub Actions so changes to the Python server and related logic are continuously validated on pushes to main and on pull requests.

Changes:

  • Introduces a new GitHub Actions workflow to run unittest discovery against tests/test_*.py.
  • Sets up a Python runtime on ubuntu-latest and executes the test suite without any dependency install step.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +9 to +16
python:
name: python unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
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.

2 participants