From ceb28df8dac886bc21ace93205842f6c61e59c8f Mon Sep 17 00:00:00 2001 From: hugo8xx Date: Mon, 24 Aug 2026 14:50:40 +0700 Subject: [PATCH] ci: run the tests on push and pull request MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The repo is public and nothing ran the tests. Two of them hold product promises rather than implementation details — synthesize() must call nothing but the caller's distill, and record() must block by default — and both would break silently under a well-meaning refactor. Matrix is 3.9 and 3.13: the floor in requires-python and current. A client library breaking on the Python a user already has is something you otherwise learn from an issue. The job also runs `build` + `twine check`, because today's release failed on Metadata-Version 2.5 with an error that named metadata and meant toolchain. That belongs in CI, not in the moment someone is trying to ship. --- .github/workflows/test.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..d6cef49 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,33 @@ +name: test + +on: + push: + branches: [main] + pull_request: + +# The repo is public: this is what stops a drive-by PR — or us — from quietly +# undoing a guarantee the tests exist to hold. test_verify_lessons_synthesis +# asserts that synthesize() calls nothing but the caller's distill, and +# test_record_background asserts that record() blocks by default. Both are +# product promises, not implementation details. +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + # Oldest supported and current. A client library breaking on the Python + # a user already has is the kind of thing you find out from an issue. + python-version: ["3.9", "3.13"] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - run: pip install -e . build twine + - run: python test_record_background.py + - run: python test_verify_lessons_synthesis.py + # Catches the metadata-version trap before a release does: the build has to + # produce something twine will actually accept. + - run: python -m build + - run: python -m twine check dist/*