1
1
---
2
2
name : tox
3
3
4
+ concurrency :
5
+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
6
+ cancel-in-progress : true
7
+
4
8
on :
5
9
push : # only publishes pushes to the main branch to TestPyPI
6
10
branches : # any integration branch but not tag
7
11
- " main"
8
12
pull_request :
9
- branches :
10
- - " main"
11
-
12
- concurrency :
13
- group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
14
- cancel-in-progress : true
15
-
16
- env :
17
- FORCE_COLOR : 1 # tox, pytest, ansible-lint
18
- PY_COLORS : 1
13
+ workflow_call :
19
14
20
15
jobs :
21
16
pre :
54
49
55
50
env :
56
51
PYTEST_REQPASS : 450
52
+ environment : test
57
53
steps :
58
54
- uses : actions/checkout@v4
59
55
with :
@@ -119,14 +115,20 @@ jobs:
119
115
# produce a single .coverage file at repo root
120
116
run : tox -e coverage
121
117
118
+ - name : Archive logs
119
+ uses : actions/upload-artifact@v4
120
+ with :
121
+ name : logs-${{ matrix.name }}.zip
122
+ path : .tox/**/log/
123
+
122
124
- name : Upload coverage data
123
125
if : ${{ startsWith(matrix.passed_name, 'py') }}
124
- uses : codecov/codecov-action@v3
126
+ uses : codecov/codecov-action@v4
125
127
with :
126
- name : ${{ matrix.passed_name }}
127
- fail_ci_if_error : false # see https://github.com/codecov/codecov-action/issues/598
128
+ name : ${{ matrix.name }}
128
129
token : ${{ secrets.CODECOV_TOKEN }}
129
- verbose : true # optional (default = false)
130
+ verbose : true
131
+ fail_ci_if_error : true
130
132
131
133
- name : Report failure if git reports dirty status
132
134
run : |
@@ -142,10 +144,14 @@ jobs:
142
144
143
145
needs :
144
146
- build
145
-
146
147
runs-on : ubuntu-latest
147
-
148
148
steps :
149
+ - name : Merge logs into a single archive
150
+ uses : actions/upload-artifact/merge@v4
151
+ with :
152
+ name : logs.zip
153
+ pattern : logs-*.zip
154
+ delete-merged : true
149
155
- name : Decide whether the needed jobs succeeded or failed
150
156
uses : re-actors/alls-green@release/v1
151
157
with :
0 commit comments