Skip to content

Merge pull request #151 from PetrDlouhy/tox_testing #19

Merge pull request #151 from PetrDlouhy/tox_testing

Merge pull request #151 from PetrDlouhy/tox_testing #19

Workflow file for this run

on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
# all supported django version on lowest/highest supported python
# see https://www.djangoproject.com/download/#supported-versions
# and https://docs.djangoproject.com/en/4.2/faq/install/#what-python-version-can-i-use-with-django
matrix:
include:
- { django: "4.2", python: "3.8" }
- { django: "4.2", python: "3.12" }
- { django: "5.0", python: "3.10" }
- { django: "5.0", python: "3.12" }
- { django: "5.1", python: "3.10" }
- { django: "5.1", python: "3.12" }
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install test deps
run: pip install flake8 tox
- name: Install library
run: pip install -e .
- name: Lint
run: flake8 --ignore=E501
- name: Run tests
working-directory: example
run: |
PYTHON_VERSION=`echo ${{ matrix.python }} | sed 's/\.//'`
DJANGO_VERSION=`echo ${{ matrix.django }} | sed 's/\.//'`
tox -e python${PYTHON_VERSION}-django${DJANGO_VERSION}