Merge pull request #179 from georgek/py312 #103
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: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- uses: pre-commit/action@v2.0.2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tests: | |
name: Python ${{ matrix.python-version }} (${{ matrix.toxenv }}) | |
runs-on: ubuntu-latest | |
needs: lint | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.10"] | |
django-version: ["3.2", "4.2", "5.0"] | |
experimental: [false] | |
include: | |
- python-version: "3.12" | |
django-version: "packaging" | |
experimental: false | |
- python-version: "3.12" | |
django-version: "main" | |
experimental: true | |
exclude: | |
# Unsupported Python versions for Django 5.0 | |
- python-version: 3.8 | |
django-version: 5.0 | |
- python-version: 3.9 | |
django-version: 5.0 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install --upgrade coveralls tox tox-py tox-venv tox-gh-actions | |
- name: Tox tests | |
run: tox -v | |
continue-on-error: ${{ matrix.experimental }} | |
env: | |
DJANGO: ${{ matrix.django-version }} | |
- name: Upload coverage data to coveralls.io | |
if: ${{ matrix.python-version != 'pypy-3.10' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COVERALLS_FLAG_NAME: run-${{ matrix.python-version }} | |
COVERALLS_PARALLEL: true | |
run: coveralls --service=github | |
finish: | |
name: Indicate completion to coveralls.io | |
needs: tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Finalize publishing to coveralls.io | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
parallel-finished: true |