[ADD] support python 3.12 (#3) #23
Workflow file for this run
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: Test & Deploy | |
# yamllint disable-line rule:truthy | |
on: | |
push: | |
branches: | |
- "master" | |
tags: | |
- "*.*.*" | |
pull_request: | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- uses: pre-commit/[email protected] | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: ["3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: | | |
pip install -U pip | |
pip install -U setuptools | |
sudo apt update | |
sudo apt install -y build-essential libpq-dev python3-dev | |
- name: Install tox | |
run: pip install tox | |
- name: Run tox | |
# Run tox using the version of Python in `PATH` | |
run: tox -e py | |
deploy: | |
runs-on: ubuntu-latest | |
needs: [pre-commit, test] | |
if: startsWith(github.ref, 'refs/tags') | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
pip install -U pip | |
pip install -U wheel setuptools | |
- name: Build package | |
run: python setup.py sdist bdist_wheel | |
- name: Publish package to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |