Skip to content

[pre-commit.ci] pre-commit autoupdate (#548) #1216

[pre-commit.ci] pre-commit autoupdate (#548)

[pre-commit.ci] pre-commit autoupdate (#548) #1216

Workflow file for this run

---
name: Run Tests
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
release:
types: [released]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
django-version: ["3.2.0", "4.1.3", "4.2.8", "5.0"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
exclude:
# excludes Python 3.8 and 3.9 for Django 5.0.
- django-version: "5.0"
python-version: "3.8"
- django-version: "5.0"
python-version: "3.9"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Run tests
run: |
poetry install -E captcha
poetry run pip install "Django~=${{ matrix.django-version }}"
make test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4