Add support for Django 5.1 and Python 3.13, drop support for Django 3.2 and Python 3.8 #131
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: Run tests | |
env: | |
DEFAULT_PYTHON: 3.9 | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test: | |
name: Python ${{ matrix.python_version }} | |
runs-on: ubuntu-latest | |
env: | |
TOX_POSARGS: -- --cov=. --cov-report=xml | |
strategy: | |
matrix: | |
python_version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python_version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python_version }} | |
cache: "pip" | |
cache-dependency-path: "requirements-test.txt" | |
- name: Upgrade packaging tools | |
run: python -m pip install --upgrade pip setuptools wheel | |
- name: Install dependencies | |
run: python -m pip install --upgrade codecov tox | |
- name: Run tox targets for Python ${{ matrix.python_version }} | |
run: tox run -f py$(echo ${{ matrix.python_version }} | tr -d .) ${{ env.TOX_POSARGS }} | |
- name: Upload Coverage to Codecov | |
if: ${{ matrix.python_version == env.DEFAULT_PYTHON }} | |
uses: codecov/codecov-action@v4 | |
build: | |
name: Build package | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.DEFAULT_PYTHON }} | |
- name: Install dependencies | |
run: pip install -U setuptools wheel build | |
- name: Build | |
run: python -m build . | |
commitlint: | |
name: Commitlint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check commitlint | |
uses: wagoid/commitlint-github-action@0d749a1a91d4770e983a7b8f83d4a3f0e7e0874e # v5.4.4 | |
black: | |
name: Coding style - black | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run black | |
uses: psf/black@stable | |
with: | |
options: "--check" | |
flake8: | |
name: Coding style - flake8 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.DEFAULT_PYTHON }} | |
- name: Install dependencies | |
run: pip install flake8 pep8-naming flake8-bugbear | |
- name: Run flake8 | |
uses: liskin/gh-problem-matcher-wrap@v3 | |
with: | |
linters: flake8 | |
run: flake8 | |
isort: | |
name: Coding style - isort | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.DEFAULT_PYTHON }} | |
- name: Install dependencies | |
run: pip install isort | |
- name: Run isort | |
uses: liskin/gh-problem-matcher-wrap@v3 | |
with: | |
linters: isort | |
run: isort -c . |