-
Notifications
You must be signed in to change notification settings - Fork 2
392 lines (366 loc) · 12.1 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
name: Test
on:
push:
# branches: main
pull_request:
workflow_dispatch:
inputs:
debug:
description: 'Open ssh debug session.'
required: true
default: false
type: boolean
schedule:
- cron: '0 13 * * SUN' # Runs at 6 am pacific every sunday
jobs:
test-linux:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
django-version:
- '3.2' # LTS April 2024
- '4.2' # LTS April 2026
- '5.0' # April 2025
- '5.1' # December 2025
exclude:
- python-version: '3.9'
django-version: '5.0'
- python-version: '3.11'
django-version: '3.2'
- python-version: '3.12'
django-version: '3.2'
- python-version: '3.9'
django-version: '5.1'
- python-version: '3.13'
django-version: '3.2'
- python-version: '3.13'
django-version: '4.2'
- python-version: '3.13'
django-version: '5.0'
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup Just
uses: extractions/setup-just@v2
- name: Install
run: |
just init
just install
just pin-dependency Django~=${{ matrix.django-version }}
- name: Install Emacs
if: ${{ github.event.inputs.debug == 'true' }}
run: |
sudo apt install emacs
- name: Setup tmate session
if: ${{ github.event.inputs.debug == 'true' }}
uses: mxschmitt/action-tmate@v3
with:
detached: true
timeout-minutes: 60
- name: Run Unit Tests
run: |
just test-all
mv .coverage py${{ matrix.python-version }}-dj${{ matrix.django-version }}.coverage
- name: Store coverage files
uses: actions/upload-artifact@v4
with:
name: coverage-linux-py${{ matrix.python-version }}-dj${{ matrix.django-version }}
path: py${{ matrix.python-version }}-dj${{ matrix.django-version }}.coverage
test-windows:
runs-on: windows-latest
defaults:
run:
shell: pwsh
strategy:
matrix:
python-version: ['3.9', '3.13']
django-version:
- '3.2' # LTS April 2024
- '5.1' # December 2025
exclude:
- python-version: '3.9'
django-version: '5.1'
- python-version: '3.13'
django-version: '3.2'
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup Just
uses: extractions/setup-just@v2
- name: Install
run: |
just init
just install
just pin-dependency Django~=${{ matrix.django-version }}
- name: Install VIM
if: ${{ github.event.inputs.debug == 'true' }}
uses: rhysd/action-setup-vim@v1
- name: Setup tmate session
if: ${{ github.event.inputs.debug == 'true' }}
uses: mxschmitt/action-tmate@v3
with:
detached: true
timeout-minutes: 60
- name: Run Unit Tests
run: |
just test-all
mv .coverage py${{ matrix.python-version }}-dj${{ matrix.django-version }}.coverage
- name: Store coverage files
uses: actions/upload-artifact@v4
with:
name: coverage-windows-py${{ matrix.python-version }}-dj${{ matrix.django-version }}
path: py${{ matrix.python-version }}-dj${{ matrix.django-version }}.coverage
test-macos:
runs-on: macos-latest
strategy:
matrix:
python-version: ['3.9', '3.13']
django-version:
- '3.2' # LTS April 2024
- '5.1' # December 2025
exclude:
- python-version: '3.9'
django-version: '5.1'
- python-version: '3.13'
django-version: '3.2'
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup Just
uses: extractions/setup-just@v2
- name: Set up Homebrew
if: ${{ github.event.inputs.debug == 'true' }}
uses: Homebrew/actions/setup-homebrew@master
- name: Install Emacs
if: ${{ github.event.inputs.debug == 'true' }}
run: |
brew install emacs
- name: Install
run: |
just init
just install
just pin-dependency Django~=${{ matrix.django-version }}
- name: Setup tmate session
if: ${{ github.event.inputs.debug == 'true' }}
uses: mxschmitt/action-tmate@v3
with:
detached: true
timeout-minutes: 60
- name: Run Unit Tests
run: |
just test-all
mv .coverage py${{ matrix.python-version }}-dj${{ matrix.django-version }}.coverage
- name: Store coverage files
uses: actions/upload-artifact@v4
with:
name: coverage-macos-py${{ matrix.python-version }}-dj${{ matrix.django-version }}
path: py${{ matrix.python-version }}-dj${{ matrix.django-version }}.coverage
linux-bash-complete:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.13']
django-version:
- '3.2' # LTS April 2024
- '5.1' # December 2025
exclude:
- python-version: '3.9'
django-version: '5.1'
- python-version: '3.13'
django-version: '3.2'
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup Just
uses: extractions/setup-just@v2
- name: Install
run: |
just init
just install
just pin-dependency Django~=${{ matrix.django-version }}
# - name: Install Fish shell
# run: |
# sudo apt-get update
# sudo apt-get install -y fish
- name: Install Emacs
if: ${{ github.event.inputs.debug == 'true' }}
run: |
sudo apt install emacs
- name: Setup tmate session
if: ${{ github.event.inputs.debug == 'true' }}
uses: mxschmitt/action-tmate@v3
with:
detached: true
timeout-minutes: 60
- name: Run Unit Tests
run: |
just test tests/shellcompletion/test_bash.py
mv .coverage linux-complete-py${{ matrix.python-version }}-dj${{ matrix.django-version }}.coverage
- name: Store coverage files
uses: actions/upload-artifact@v4
with:
name: coverage-linux-complete-py${{ matrix.python-version }}-dj${{ matrix.django-version }}
path: linux-complete-py${{ matrix.python-version }}-dj${{ matrix.django-version }}.coverage
macos-zsh-complete:
runs-on: macos-latest
strategy:
matrix:
python-version: ['3.9', '3.13']
django-version:
- '3.2' # LTS April 2024
- '5.1' # December 2025
exclude:
- python-version: '3.9'
django-version: '5.1'
- python-version: '3.13'
django-version: '3.2'
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup Just
uses: extractions/setup-just@v2
- name: Install Homebrew and Zshell Completion
shell: zsh {0}
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
touch ~/.zshrc
(echo; echo 'eval "$(brew shellenv)"') >> ~/.zshrc
eval "$(brew shellenv)"
brew install zsh-completions
echo "if type brew &>/dev/null; then" >> ~/.zshrc
echo " FPATH=~/.zfunc:$(brew --prefix)/share/zsh-completions:$FPATH" >> ~/.zshrc
echo " autoload -Uz compinit" >> ~/.zshrc
echo " compinit" >> ~/.zshrc
echo "fi" >> ~/.zshrc
echo "fpath+=~/.zfunc" >> ~/.zshrc
chmod go-w /opt/homebrew/share
chmod -R go-w /opt/homebrew/share/zsh
source ~/.zshrc
sudo chsh -s /bin/zsh runner
# - name: Install Bash Completions
# shell: bash
# run: |
# brew install bash-completion@2
# touch ~/.bashrc
# echo "\n[[ -r "$(brew --prefix)/etc/profile.d/bash_completion.sh" ]] && . "$(brew --prefix)/etc/profile.d/bash_completion.sh" || true" >> ~/.bash_profile
# source ~/.bashrc
# - name: Install Fish shell
# run: |
# brew install sbt
# brew install fish
- name: Install Emacs
if: ${{ github.event.inputs.debug == 'true' }}
run: |
brew install emacs
- name: Install
run: |
just init
just install
just pin-dependency Django~=${{ matrix.django-version }}
- name: Setup tmate session
if: ${{ github.event.inputs.debug == 'true' }}
uses: mxschmitt/action-tmate@v3
with:
detached: true
timeout-minutes: 60
- name: Run Unit Tests
shell: zsh {0}
run: |
just test tests/shellcompletion/test_zsh.py || exit 1
mv .coverage macos-zsh-py${{ matrix.python-version }}-dj${{ matrix.django-version }}.coverage
- name: Store coverage files
uses: actions/upload-artifact@v4
with:
name: coverage-macos-zsh-py${{ matrix.python-version }}-dj${{ matrix.django-version }}
path: macos-zsh-py${{ matrix.python-version }}-dj${{ matrix.django-version }}.coverage
windows-powershell-complete:
runs-on: windows-latest
strategy:
matrix:
python-version: ['3.9', '3.13']
django-version:
- '3.2' # LTS April 2024
- '5.0' # April 2025
exclude:
- python-version: '3.9'
django-version: '5.0'
- python-version: '3.13'
django-version: '3.2'
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Add to Poetry to PATH
run: echo "C:\Users\runneradmin\.local\bin" >> $env:GITHUB_PATH
shell: powershell
- name: Setup Just
uses: extractions/setup-just@v2
- name: Install Release Dependencies
run: |
just init
just install
just pin-dependency Django~=${{ matrix.django-version }}
shell: powershell
- name: Run Unit Tests
run: |
just test tests/shellcompletion/test_powershell.py
mv .coverage windows-powershell-py${{ matrix.python-version }}-dj${{ matrix.django-version }}.coverage
shell: powershell
- name: Store coverage files
uses: actions/upload-artifact@v4
with:
name: coverage-windows-powershell-py${{ matrix.python-version }}-dj${{ matrix.django-version }}
path: windows-powershell-py${{ matrix.python-version }}-dj${{ matrix.django-version }}.coverage
coverage-combine:
needs: [test-linux, test-windows, test-macos, linux-bash-complete, macos-zsh-complete, windows-powershell-complete]
runs-on: ubuntu-latest
steps:
- name: Install Emacs
if: ${{ github.event.inputs.debug == 'true' }}
run: |
sudo apt install emacs
- name: Setup tmate session
if: ${{ github.event.inputs.debug == 'true' }}
uses: mxschmitt/action-tmate@v3
with:
detached: true
timeout-minutes: 60
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Setup Just
uses: extractions/setup-just@v2
- name: Install Release Dependencies
run: |
just init
just install
- name: Get coverage files
uses: actions/download-artifact@v4
with:
pattern: coverage-*
merge-multiple: true
- run: ls -la *.coverage
- run: just coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
verbose: true