-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (49 loc) · 1.53 KB
/
run_tests.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
name: Run tests
on:
push:
schedule:
# Every 13th and 28th of the month at 07:42
- cron: '42 7 13,28 * *'
jobs:
tests:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
django-version: ['~=2.1.0', '~=2.2.8', '~=3.0.0', '~=3.1.0', '~=3.2.0']
exclude:
- python-version: '3.8'
django-version: '~=2.1.0'
- python-version: '3.9'
django-version: '~=2.1.0'
- python-version: '3.10'
django-version: '~=2.1.0'
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: python -m pip install --upgrade pip virtualenv
- name: Run Tests
env:
DJANGO_VERSION: ${{ matrix.django-version }}
run: './dev_server.sh -d test'
all-tests:
runs-on: ubuntu-latest
needs: [tests]
if: always()
steps:
- name: Failed tests
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
- name: Cancelled tests
if: ${{ contains(needs.*.result, 'cancelled') }}
run: exit 1
- name: Skipped tests
if: ${{ contains(needs.*.result, 'skipped') }}
run: exit 1
- name: Successful tests
if: ${{ !(contains(needs.*.result, 'failure')) && !(contains(needs.*.result, 'cancelled')) && !(contains(needs.*.result, 'skipped')) }}
run: exit 0