Skip to content

Commit 807d348

Browse files
committed
Generate coverage
1 parent d8321f1 commit 807d348

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/test.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ jobs:
3434
run: |
3535
tox -r -e $(echo "${{ matrix.python }}" | tr -d .)
3636
37+
- name: Upload coverage
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: coverage-${{ matrix.python }}
41+
path: .coverage.*
42+
include-hidden-files: true
43+
3744
test-windows:
3845
name: Test Windows
3946
runs-on: windows-2025
@@ -155,3 +162,41 @@ jobs:
155162
with:
156163
dockerfile: ./docker/${{ matrix.dockerfile }}
157164
config: .config/hadolint.yaml
165+
166+
coverage-report:
167+
name: Coverage Report
168+
runs-on: ubuntu-24.04
169+
needs: test
170+
steps:
171+
- name: Checkout
172+
uses: actions/checkout@v4.2.2
173+
with:
174+
fetch-depth: 1
175+
show-progress: false
176+
persist-credentials: false
177+
178+
- name: Download coverage artifacts
179+
uses: actions/download-artifact@v4
180+
with:
181+
pattern: coverage-*
182+
merge-multiple: true
183+
184+
- name: Set up Python
185+
uses: actions/setup-python@v5
186+
with:
187+
python-version: '3.14'
188+
189+
- name: Install coverage
190+
run: pip install coverage
191+
192+
- name: Combine coverage
193+
run: |
194+
coverage combine
195+
coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
196+
coverage html
197+
198+
- name: Upload HTML report
199+
uses: actions/upload-artifact@v4
200+
with:
201+
name: coverage-html-report
202+
path: htmlcov/

0 commit comments

Comments
 (0)