Skip to content

Test and Support Python 3.12 #215

Test and Support Python 3.12

Test and Support Python 3.12 #215

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
lint-command:
- bandit -r . -x ./tests
- black --check --diff .
- flake8 .
- isort --check-only --diff .
- pydocstyle .
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: 'pip'
cache-dependency-path: 'linter-requirements.txt'
- run: python -m pip install -r linter-requirements.txt
- run: ${{ matrix.lint-command }}
dist:
runs-on: ubuntu-latest
needs: [lint]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.x"
cache: 'pip'
cache-dependency-path: '**/pyproject.toml'
- run: python -m pip install --upgrade pip build wheel twine
- run: python -m build --sdist --wheel
- run: python -m twine check dist/*
docs:
runs-on: ubuntu-latest
needs: [lint]
steps:
- uses: actions/checkout@v3
- name: setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: 'pip'
cache-dependency-path: '**/pyproject.toml'
- run: python -m pip install -e .[docs]
- run: python -m sphinx -b html -W docs docs/_build
PyTest:
runs-on: ubuntu-latest
needs: [lint]
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
django-version:
- "2.2"
- "3.2"
- "4.1"
- "4.2"
steps:
- uses: actions/checkout@v3
- name: Setup Python version ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: '**/pyproject.toml'
- run: python -m pip install .[test]
- run: python -m pip install Django~="${{ matrix.django-version }}.0"
- run: python -m pytest
- uses: codecov/codecov-action@v3