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