11---
22name : tox
33
4+ concurrency :
5+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
6+ cancel-in-progress : true
7+
48on :
59 push : # only publishes pushes to the main branch to TestPyPI
610 branches : # any integration branch but not tag
711 - " main"
812 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 :
1914
2015jobs :
2116 pre :
@@ -111,13 +106,20 @@ jobs:
111106 # produce a single .coverage file at repo root
112107 run : tox -e coverage
113108
109+ - name : Archive logs
110+ uses : actions/upload-artifact@v4
111+ with :
112+ name : logs-${{ matrix.name }}.zip
113+ path : .tox/**/log/
114+
114115 - name : Upload coverage data
115116 if : ${{ startsWith(matrix.passed_name, 'py') }}
116117 uses : codecov/codecov-action@v4
117118 with :
118- name : ${{ matrix.passed_name }}
119+ name : ${{ matrix.name }}
119120 token : ${{ secrets.CODECOV_TOKEN }}
120- verbose : true # optional (default = false)
121+ verbose : true
122+ fail_ci_if_error : true
121123
122124 - name : Report failure if git reports dirty status
123125 run : |
@@ -133,10 +135,14 @@ jobs:
133135
134136 needs :
135137 - build
136-
137138 runs-on : ubuntu-latest
138-
139139 steps :
140+ - name : Merge logs into a single archive
141+ uses : actions/upload-artifact/merge@v4
142+ with :
143+ name : logs.zip
144+ pattern : logs-*.zip
145+ delete-merged : true
140146 - name : Decide whether the needed jobs succeeded or failed
141147 uses : re-actors/alls-green@release/v1
142148 with :
0 commit comments