-
Notifications
You must be signed in to change notification settings - Fork 208
45 lines (36 loc) · 1.21 KB
/
tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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}