@@ -23,7 +23,7 @@ permissions:
2323
2424jobs :
2525 test :
26- name : Test with Node.js ${{ inputs.node-version }} on ${{ inputs.runs-on }}
26+ name : Test ${{ inputs.codecov == true && 'and Coverage ' || '' }} with Node.js ${{ inputs.node-version }} on ${{ inputs.runs-on }}
2727 timeout-minutes : 20
2828 runs-on : ${{ inputs.runs-on }}
2929 steps :
7878 NODE_V8_COVERAGE : ${{ inputs.codecov == true && './coverage/tmp' || '' }}
7979 UNDICI_NO_WASM_SIMD : ${{ inputs['no-wasm-simd'] }}
8080
81+ - name : Test node-test
82+ run : npm run test:node-test
83+ id : test-node-test
84+ env :
85+ CI : true
86+ NODE_V8_COVERAGE : ${{ inputs.codecov == true && './coverage/tmp' || '' }}
87+ UNDICI_NO_WASM_SIMD : ${{ inputs['no-wasm-simd'] }}
88+
89+ - name : Test fetch
90+ run : npm run test:fetch
91+ id : test-fetch
92+ env :
93+ CI : true
94+ NODE_V8_COVERAGE : ${{ inputs.codecov == true && './coverage/tmp' || '' }}
95+ UNDICI_NO_WASM_SIMD : ${{ inputs['no-wasm-simd'] }}
96+
8197 - name : Test node-fetch
8298 run : npm run test:node-fetch
8399 id : test-node-fetch
@@ -94,33 +110,34 @@ jobs:
94110 NODE_V8_COVERAGE : ${{ inputs.codecov == true && './coverage/tmp' || '' }}
95111 UNDICI_NO_WASM_SIMD : ${{ inputs['no-wasm-simd'] }}
96112
97- - name : Test cache-interceptor
113+ - name : Test cache-interceptor ${{ inputs.node-version != '20' && 'with' || 'without' }} sqlite
98114 run : npm run test:cache-interceptor
99115 id : test-cache-interceptor
100116 env :
101117 CI : true
118+ NODE_OPTIONS : ${{ inputs.node-version != '20' && '--experimental-sqlite' || '' }}
102119 NODE_V8_COVERAGE : ${{ inputs.codecov == true && './coverage/tmp' || '' }}
103120 UNDICI_NO_WASM_SIMD : ${{ inputs['no-wasm-simd'] }}
104-
105- - name : Test interceptors
106- run : npm run test:interceptors
107- id : test-interceptors
121+
122+ - name : Test cache-tests
123+ run : npm run test:cache-tests
124+ id : test-cache-tests
108125 env :
109126 CI : true
110127 NODE_V8_COVERAGE : ${{ inputs.codecov == true && './coverage/tmp' || '' }}
111128 UNDICI_NO_WASM_SIMD : ${{ inputs['no-wasm-simd'] }}
112129
113- - name : Test fetch
114- run : npm run test:fetch
115- id : test-fetch
130+ - name : Test cookies
131+ run : npm run test:cookies
132+ id : test-cookies
116133 env :
117134 CI : true
118135 NODE_V8_COVERAGE : ${{ inputs.codecov == true && './coverage/tmp' || '' }}
119136 UNDICI_NO_WASM_SIMD : ${{ inputs['no-wasm-simd'] }}
120-
121- - name : Test cookies
122- run : npm run test:cookies
123- id : test-cookies
137+
138+ - name : Test interceptors
139+ run : npm run test:interceptors
140+ id : test-interceptors
124141 env :
125142 CI : true
126143 NODE_V8_COVERAGE : ${{ inputs.codecov == true && './coverage/tmp' || '' }}
@@ -140,6 +157,7 @@ jobs:
140157 env :
141158 CI : true
142159 NODE_V8_COVERAGE : ${{ inputs.codecov == true && './coverage/tmp' || '' }}
160+ UNDICI_NO_WASM_SIMD : ${{ inputs['no-wasm-simd'] }}
143161
144162 - name : Test subresource-integrity
145163 run : npm run test:subresource-integrity
@@ -157,38 +175,13 @@ jobs:
157175 NODE_V8_COVERAGE : ${{ inputs.codecov == true && './coverage/tmp' || '' }}
158176 UNDICI_NO_WASM_SIMD : ${{ inputs['no-wasm-simd'] }}
159177
160- - name : Test node-test
161- run : npm run test:node-test
162- id : test-node-test
163- env :
164- CI : true
165- NODE_V8_COVERAGE : ${{ inputs.codecov == true && './coverage/tmp' || '' }}
166- UNDICI_NO_WASM_SIMD : ${{ inputs['no-wasm-simd'] }}
167-
168- - name : Test cache-tests
169- run : npm run test:cache-tests
170- id : test-cache-tests
171- env :
172- CI : true
173- NODE_V8_COVERAGE : ${{ inputs.codecov == true && './coverage/tmp' || '' }}
174- UNDICI_NO_WASM_SIMD : ${{ inputs['no-wasm-simd'] }}
175-
176178 - name : Test jest
177179 run : npm run test:jest
178180 id : test-jest
179181 env :
180182 CI : true
181183 NODE_V8_COVERAGE : ' '
182184 UNDICI_NO_WASM_SIMD : ${{ inputs['no-wasm-simd'] }}
183-
184- - name : Test sqlite
185- if : inputs.node-version != '20'
186- run : npm run test:sqlite
187- id : test-sqlite
188- env :
189- CI : true
190- NODE_V8_COVERAGE : ${{ inputs.codecov == true && './coverage/tmp' || '' }}
191- UNDICI_NO_WASM_SIMD : ${{ inputs['no-wasm-simd'] }}
192185
193186 - name : Test wpt
194187 run : npm run test:wpt
@@ -198,7 +191,12 @@ jobs:
198191 NODE_V8_COVERAGE : ${{ inputs.codecov == true && './coverage/tmp' || '' }}
199192 UNDICI_NO_WASM_SIMD : ${{ inputs['no-wasm-simd'] }}
200193
201- - name : Coverage Report
194+ - name : Coverage summary
195+ if : inputs.codecov == true
196+ run : npm run coverage:report:ci
197+ id : prepare-coverage-report
198+
199+ - name : Upload coverage report to Codecov
202200 if : inputs.codecov == true
203201 uses : codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00 # v5.5.0
204202 with :
0 commit comments