Skip to content

Commit df729b3

Browse files
committed
Add coverage support
1 parent d1db290 commit df729b3

3 files changed

Lines changed: 37 additions & 1 deletion

File tree

.github/actions/nox-run/action.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,10 @@ runs:
2121
env:
2222
UV_LINK_MODE: copy
2323
shell: bash
24+
25+
- name: upload coverage artifact
26+
if: contains(inputs.nox-session, 'pytest')
27+
uses: actions/upload-artifact@v4
28+
with:
29+
name: coverage-${{ inputs.nox-session }}
30+
path: ci/test-reports/${{ inputs.nox-session }}.pytests.xml

.github/workflows/nox.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ concurrency:
1212
group: ${{ github.workflow }}-${{ github.ref }}
1313
cancel-in-progress: true
1414

15+
16+
permissions:
17+
contents: read # for actions/checkout
18+
id-token: write # For codecov OIDC
19+
20+
1521
jobs:
1622
generate-matrix:
1723
runs-on: ubuntu-24.04
@@ -111,3 +117,26 @@ jobs:
111117
- uses: ./.github/actions/nox-run
112118
with:
113119
nox-session: ${{ matrix.session }}
120+
121+
122+
codecov:
123+
needs: [nox-other, nox-pg, nox-mssq]
124+
runs-on: ubuntu-latest
125+
126+
steps:
127+
# Codecov action says we have to have done a checkout
128+
- name: Checkout
129+
uses: actions/checkout@v4
130+
131+
- uses: actions/download-artifact@v5
132+
with:
133+
path: ci/github-coverage
134+
merge-multiple: true
135+
136+
- name: Coverage files
137+
run: ls -R ci/
138+
139+
- uses: codecov/codecov-action@v5
140+
with:
141+
use_oidc: true
142+
directory: ci/github-coverage

tasks/gh-nox-sessions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python
2-
# mise description='Nox session list for GH CI'
2+
# mise description='Nox session groups for GH CI'
33
import json
44
from os import environ
55

0 commit comments

Comments
 (0)