@@ -3,26 +3,7 @@ name: Django CI
3
3
on : [push, pull_request]
4
4
5
5
jobs :
6
- postgres :
7
-
8
- runs-on : ubuntu-latest
9
-
10
- services :
11
- postgres :
12
- image : postgres
13
- env :
14
- POSTGRES_PASSWORD : postgres
15
- # Set health checks to wait until postgres has started
16
- options : >-
17
- --health-cmd pg_isready
18
- --health-interval 10s
19
- --health-timeout 5s
20
- --health-retries 5
21
- ports :
22
- # Maps tcp port 5432 on service container to the host
23
- - 5432:5432
24
-
25
- name : Postgres - Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }} (Allowed Failures - ${{ matrix.django-version == 'main' }} )
6
+ non-selenium-tests :
26
7
strategy :
27
8
max-parallel : 4
28
9
matrix :
@@ -49,93 +30,10 @@ jobs:
49
30
python-version : ' 3.12'
50
31
- django-version : ' 4.1.0'
51
32
python-version : ' 3.12'
52
- steps :
53
- - uses : actions/checkout@v4
54
- - name : Set up Python ${{ matrix.python-version }}
55
- uses : actions/setup-python@v5
56
- with :
57
- python-version : ${{ matrix.python-version }}
58
- - name : Install Dependencies
59
- continue-on-error : ${{ matrix.django-version == 'main' }}
60
- run : |
61
- python -m pip install --upgrade pip
62
- pip install -r requirements.txt -r requirements-dev.txt
63
- - name : ' Install psycopg2'
64
- run : |
65
- pip install psycopg2
66
- - name : Install Django Release
67
- run : |
68
- pip install django~=${{ matrix.django-version }}
69
- if : matrix.django-version != 'main'
70
- - name : Install Django Main
71
- continue-on-error : ${{ matrix.django-version == 'main' }}
72
- run : |
73
- pip install 'https://github.com/django/django/archive/main.tar.gz'
74
- if : matrix.django-version == 'main'
75
- - name : Run Tests
76
- continue-on-error : ${{ matrix.django-version == 'main' }}
77
- env :
78
- TESTDB : postgres
79
- run : |
80
- export PYTHONWARNINGS=always
81
- coverage run --source='wafer' manage.py test --exclude-tag selenium && coverage report --skip-covered
82
-
83
- sqlite :
84
-
85
- runs-on : ubuntu-latest
86
-
87
- name : SQLite - Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }} (Allowed Failures - ${{ matrix.django-version == 'main'}} )
88
- strategy :
89
- max-parallel : 4
90
- matrix :
91
- python-version : ['3.8', '3.9', '3.10', '3.11', '3.12']
92
- django-version : ['3.2.0', '4.0.0', '4.1.0', '4.2.0', '5.0.0', 'main']
93
- exclude :
94
- - django-version : ' 4.2.0'
95
- python-version : ' 3.8'
96
- - django-version : ' main'
97
- python-version : ' 3.8'
98
- - django-version : ' main'
99
- python-version : ' 3.9'
100
- - django-version : ' 5.0.0'
101
- python-version : ' 3.8'
102
- - django-version : ' 5.0.0'
103
- python-version : ' 3.9'
104
- - django-version : ' 3.2.0'
105
- python-version : ' 3.11'
106
- - django-version : ' 4.0.0'
107
- python-version : ' 3.11'
108
- - django-version : ' 3.2.0'
109
- python-version : ' 3.12'
110
- - django-version : ' 4.0.0'
111
- python-version : ' 3.12'
112
- - django-version : ' 4.1.0'
113
- python-version : ' 3.12'
114
- steps :
115
- - uses : actions/checkout@v4
116
- - name : Set up Python ${{ matrix.python-version }}
117
- uses : actions/setup-python@v5
118
- with :
119
- python-version : ${{ matrix.python-version }}
120
- - name : Install Dependencies
121
- continue-on-error : ${{ matrix.django-version == 'main' }}
122
- run : |
123
- python -m pip install --upgrade pip
124
- pip install -r requirements.txt -r requirements-dev.txt
125
- - name : Install Django Release
126
- run : |
127
- pip install django~=${{ matrix.django-version }}
128
- if : matrix.django-version != 'main'
129
- - name : Install Django Main
130
- continue-on-error : ${{ matrix.django-version == 'main' }}
131
- run : |
132
- pip install 'https://github.com/django/django/archive/main.tar.gz'
133
- if : matrix.django-version == 'main'
134
- - name : Run Tests
135
- continue-on-error : ${{ matrix.django-version == 'main' }}
136
- run : |
137
- export PYTHONWARNINGS=always
138
- coverage run --source='wafer' manage.py test --exclude-tag selenium && coverage report --skip-covered
33
+ uses : ./.github/workflows/run_tests.yml
34
+ with :
35
+ python-version : ${{ matrix.python-version }}
36
+ django-version : ${{ matrix.django-version }}
139
37
140
38
translations :
141
39
runs-on : ubuntu-latest
0 commit comments