-
Notifications
You must be signed in to change notification settings - Fork 39
58 lines (47 loc) · 1.34 KB
/
unittests.yml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
name: unittests
on:
pull_request:
branches:
- master
jobs:
main:
runs-on: ubuntu-latest
strategy:
matrix:
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
django:
- "3.2"
- "4.0"
- "4.1"
- "4.2"
env:
DJANGO_SETTINGS_MODULE: sites.test.settings
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Set up pip
run: |
python -m pip install --upgrade pip
- name: Install Django ${{ matrix.django }}
run: |
DJANGO_VERSION_MAJOR=$(echo ${{ matrix.django }} | cut -d. -f1)
DJANGO_VERSION_NEXT_MINOR=$(($(echo ${{ matrix.django }} | cut -d. -f2) + 1))
python -m pip install "Django>=${{ matrix.django }},<$DJANGO_VERSION_MAJOR.$DJANGO_VERSION_NEXT_MINOR"
- name: Install django-admin-sortable2 for Django 3.2
if: ${{ matrix.django == '3.2' }}
run: |
python -m pip install django-admin-sortable2==1.0.4
- name: Install dependencies
run: |
python -m pip install -r requirements.test.txt
- name: Test
run: |
py.test tests