File tree Expand file tree Collapse file tree 1 file changed +51
-1
lines changed Expand file tree Collapse file tree 1 file changed +51
-1
lines changed Original file line number Diff line number Diff line change 9
9
pull_request :
10
10
branches :
11
11
- " *"
12
+ release :
13
+ types :
14
+ - published
12
15
schedule :
13
16
# Daily at 05:47
14
17
- cron : ' 47 5 * * *'
21
24
PIP_NO_PYTHON_VERSION_WARNING : 1
22
25
23
26
jobs :
27
+ build :
28
+ name : Build
29
+ runs-on : ubuntu-latest
30
+ container : docker://python:3.11-buster
31
+ steps :
32
+ - uses : actions/checkout@v2
33
+ - name : Build
34
+ run : |
35
+ python -m venv venv
36
+ venv/bin/pip install --upgrade pip
37
+ venv/bin/pip install build
38
+ venv/bin/python -m build --outdir dist/
39
+ - uses : actions/upload-artifact@v4
40
+ if : always()
41
+ with :
42
+ name : dist
43
+ path : dist/*
44
+ if-no-files-found : error
45
+
24
46
test :
25
47
name : ${{ matrix.os.name }} ${{ matrix.python.name }} ${{ matrix.reactor.name }}
48
+ needs : build
26
49
runs-on : ${{ matrix.os.runs-on }}
27
50
container : ${{ matrix.os.container[matrix.python.docker] }}
28
51
strategy :
@@ -233,9 +256,15 @@ jobs:
233
256
- name : Install
234
257
run : |
235
258
pip install tox
259
+ - uses : actions/download-artifact@v4
260
+ with :
261
+ name : dist
262
+ path : dist/
236
263
- name : Test
264
+ shell : bash
237
265
run : |
238
- tox -v -e "${{ matrix.python.tox }}-${{ matrix.reactor.tox }}reactor"
266
+ tox --installpkg dist/*.whl -v -e "${{ matrix.python.tox }}-${{ matrix.reactor.tox }}reactor"
267
+
239
268
linting :
240
269
name : Linting
241
270
runs-on : ubuntu-latest
@@ -257,12 +286,33 @@ jobs:
257
286
- name : Test
258
287
run : |
259
288
tox -v -e linting
289
+
290
+ publish :
291
+ name : Publish
292
+ runs-on : ubuntu-latest
293
+ needs :
294
+ - build
295
+ - test
296
+ - linting
297
+ steps :
298
+ - uses : actions/download-artifact@v4
299
+ with :
300
+ name : dist
301
+ path : dist/
302
+ - uses : pypa/gh-action-pypi-publish@release/v1
303
+ if : github.event_name == 'release'
304
+ with :
305
+ packages-dir : dist/
306
+ skip-existing : true
307
+
260
308
all :
261
309
name : All
262
310
runs-on : ubuntu-latest
263
311
needs :
312
+ - build
264
313
- test
265
314
- linting
315
+ - publish
266
316
steps :
267
317
- name : This
268
318
shell : python
You can’t perform that action at this time.
0 commit comments