File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -60,14 +60,51 @@ jobs:
60
60
uses : actions/setup-python@v5
61
61
with :
62
62
python-version : ${{ matrix.python-version }}
63
+
63
64
- name : Install hatch
64
65
uses : pypa/hatch@install
66
+
65
67
- name : Test
66
68
run : hatch test --cover --python ${{ matrix.python-version }}
69
+
70
+ - name : Disambiguate coverage filename
71
+ run : mv .coverage ".coverage.${{ matrix.os }}.${{ matrix.python-version }}"
72
+
73
+ - name : Upload coverage data
74
+ uses : actions/upload-artifact@v4
75
+ with :
76
+ include-hidden-files : true
77
+ name : coverage-${{ matrix.os }}-${{ matrix.python-version }}
78
+ path : .coverage*
79
+
80
+
81
+ coverage :
82
+ runs-on : ubuntu-latest
83
+ name : Report coverage
84
+ needs :
85
+ - run
86
+ steps :
87
+ - uses : actions/checkout@v4
88
+ - name : Install Hatch
89
+ uses : pypa/hatch@install
90
+
91
+ - name : Download coverage data
92
+ uses : actions/download-artifact@v4
93
+ with :
94
+ pattern : coverage-*
95
+ merge-multiple : true
96
+
97
+ - name : Combine coverage data
98
+ run : hatch run coverage:combine
99
+
100
+ - name : Export coverage reports
101
+ run : hatch run coverage:xml
102
+
67
103
- uses : codecov/codecov-action@v4
68
104
with :
69
105
token : ${{ secrets.CODECOV_TOKEN }}
70
106
107
+
71
108
package :
72
109
name : Build & verify package
73
110
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -16,6 +16,17 @@ features = [
16
16
" pydantic"
17
17
]
18
18
19
+ [envs .coverage ]
20
+ detached = true
21
+ dependencies = [
22
+ " coverage[toml]>=6.2" ,
23
+ " lxml" ,
24
+ ]
25
+
26
+ [envs .coverage .scripts ]
27
+ combine = " coverage combine {args}"
28
+ xml = " coverage xml"
29
+
19
30
[envs .types ]
20
31
extra-dependencies = [
21
32
" mypy==1.11.*" ,
You can’t perform that action at this time.
0 commit comments