-
Notifications
You must be signed in to change notification settings - Fork 111
63 lines (53 loc) · 1.48 KB
/
test.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
59
60
61
62
63
name: Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"]
dj-version: ["3.2.*", "4.0.*", "4.1.*", "4.2.*"]
drf-version: ["3.13.*", "3.14.*", "3.15.*"]
exclude:
- python-version: 3.7
dj-version: '4.0.*'
- python-version: 3.7
dj-version: '4.1.*'
- python-version: 3.7
dj-version: '4.2.*'
- dj-version: '4.2.*'
drf-version: '3.13.*'
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install 'django==${{ matrix.dj-version }}' 'djangorestframework==${{ matrix.drf-version }}'
- name: Run Tests
run: |
./runtests.py --fast --coverage -rw
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python39
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install flake8==5.0.4
- name: Lint Code
run: |
flake8 dynamic_rest tests