Skip to content

🤖 Drop Python 3.8, 3.9, add 3.12/3.13, fix CI and mypy errors #157

🤖 Drop Python 3.8, 3.9, add 3.12/3.13, fix CI and mypy errors

🤖 Drop Python 3.8, 3.9, add 3.12/3.13, fix CI and mypy errors #157

Workflow file for this run

name: test
on:
push:
branches: main
pull_request:
concurrency:
group: test-${{ github.head_ref }}
cancel-in-progress: true
env:
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"
jobs:
test:
name: Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }}, psycopg ${{ matrix.psycopg-version }}
runs-on: 'ubuntu-latest'
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']
django-version: ['4.2', '5.2', '6.0', 'main']
psycopg-version: ['2', "3"]
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip nox
- name: Run tests
run: |
nox --session "tests-${{ matrix.python-version }}(psycopg='${{ matrix.psycopg-version }}', django='${{ matrix.django-version }}')"
tests:
runs-on: ubuntu-latest
needs: test
if: always()
steps:
- name: OK
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Fail
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
types:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install '.[types]'
- name: Run mypy
run: |
mypy .
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install '.[test]' psycopg2-binary
# https://hynek.me/articles/ditch-codecov-python/
- name: Run tests
run: |
coverage run -m pytest
python -m coverage html --skip-covered --skip-empty
python -m coverage report | sed 's/^/ /' >> $GITHUB_STEP_SUMMARY
python -m coverage report --fail-under=100