Skip to content

Fix test run

Fix test run #2

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-22.04
strategy:
max-parallel: 4
matrix:
python-version: [3.8, 3.9, "3.10", 3.11, 3.12]
django-version: [3.2, 4.1, 4.2, "5.0"]
exclude:
# Django 3.2 only supports Python 3.6 to 3.10
- python-version: 3.11
django-version: 3.2
- python-version: 3.12
django-version: 3.2
# Django 5.0 only supports Python 3.10 to 3.12
- python-version: 3.8
django-version: 5.0
- python-version: 3.9
django-version: 5.0
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
id: setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Run Tests
run: |
poetry env use ${{ steps.setup-python.outputs.python-version }}
poetry run pytest