From cbb41e830b9feda0da4497ee5f18a54a07a857cf Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 26 Oct 2026 20:57:49 +0000 Subject: [PATCH] Extend CI: package build, docs build, PyPy, Windows/macOS, lint CLI - Build sdist/wheel and run `twine check --strict` on every push/PR, not only at release time. - Build the Sphinx docs with warnings as errors; add doc/requirements.txt and point .readthedocs.yaml at it. - Test on PyPy 3.10/3.11, matching the PyPy classifier. - Test on Windows and macOS (Python 3.13), matching "OS Independent". The test step now calls coverage directly instead of `make`, so it works on Windows runners. - Include bin/jsonpointer in flake8 runs. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01ABG5y5dMYWf6N2dxHZGBdd --- .github/workflows/test.yaml | 55 ++++++++++++++++++++++++++++++++++--- .readthedocs.yaml | 6 ++-- doc/requirements.txt | 1 + setup.cfg | 1 + 4 files changed, 56 insertions(+), 7 deletions(-) create mode 100644 doc/requirements.txt diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 775ec16..50df175 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -33,13 +33,59 @@ jobs: run: | flake8 + build: + name: "Build and check distributions" + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: actions/checkout@v4 + + - name: Set up Python 3.13 + uses: actions/setup-python@v5 + with: + python-version: "3.13" + - name: Install build tools + run: | + python -m pip install --upgrade pip + pip install build twine + - name: Build sdist and wheel + run: python -m build + - name: Check distributions + run: twine check --strict dist/* + + docs: + name: "Build documentation" + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: actions/checkout@v4 + + - name: Set up Python 3.13 + uses: actions/setup-python@v5 + with: + python-version: "3.13" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r doc/requirements.txt + - name: Build HTML docs + run: sphinx-build -W --keep-going -b html doc doc/_build/html + test: needs: [ lint ] - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - python-version: ["3.10", "3.11", "3.12", "3.13", "3.14" ] + os: [ ubuntu-latest ] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "pypy3.10", "pypy3.11" ] + include: + - os: windows-latest + python-version: "3.13" + - os: macos-latest + python-version: "3.13" steps: - uses: actions/checkout@v4 @@ -55,14 +101,15 @@ jobs: - name: Test run: | - make coverage + coverage run --source=jsonpointer -m unittest + coverage report -m coverage lcov - name: Upload coverage to Coveralls uses: coverallsapp/github-action@8d6379e14d29928660c4ba802d8e85393440b329 # v2.3.8 with: file: coverage.lcov - flag-name: python-${{ matrix.python-version }} + flag-name: ${{ matrix.os }}-python-${{ matrix.python-version }} parallel: true coveralls: diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 57ba54a..a11f336 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -17,6 +17,6 @@ sphinx: # We recommend specifying your dependencies to enable reproducible builds: # https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html -# python: -# install: -# - requirements: docs/requirements.txt +python: + install: + - requirements: doc/requirements.txt diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 0000000..6966869 --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1 @@ +sphinx diff --git a/setup.cfg b/setup.cfg index 4b36d81..1dcd460 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,4 @@ [flake8] max-line-length = 120 +filename = *.py,./bin/jsonpointer exclude = .git,.tox,dist,doc,*egg,build,.venv \ No newline at end of file