feat: support functools.partial class handlers #68
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: [push, pull_request] | |
env: | |
PY_COLORS: 1 | |
jobs: | |
tests-py: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
- "pypy-3.8" | |
- "pypy-3.9" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python ${{ matrix.python }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: pip install tox | |
- name: Run tests | |
run: tox -e py | |
tests-misc: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
env: [type, lint, format] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: pip install tox | |
- name: Run ${{ matrix.env }} | |
run: tox -e ${{ matrix.env }} | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: pip install tox | |
- name: Run docs | |
run: | | |
tox -e docs | |
mkdir -p dist | |
tar czf dist/docs.tar.gz -C build docs | |
- name: Save docs artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: docs | |
path: dist/docs.tar.gz | |
build: | |
needs: [tests-py, tests-misc, docs] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# fetch all commits for setuptools_scm | |
fetch-depth: 0 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Build | |
run: python setup.py sdist bdist_wheel | |
- name: Save build artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: dist | |
publish: | |
if: startsWith(github.ref, 'refs/tags') | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Restore build artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
path: dist | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.pypi_password }} | |
deploy-docs: | |
needs: publish | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Restore build artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: docs | |
path: dist | |
- name: Extract docs | |
run: tar xf dist/docs.tar.gz -C dist | |
- name: Deploy docs | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: dist/docs |