Skip to content

Commit 652af62

Browse files
committed
chore: add coverage merge script
1 parent 90262a6 commit 652af62

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

.github/workflows/pr-test.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -183,17 +183,12 @@ jobs:
183183
with:
184184
name: tests-build-cache-${{ github.run_number }}
185185
path: .nx
186-
# TODO: check if compiling only the affected modules is correct
187186
- name: Compile (Delta)
188187
run: npm run compile:ci:changed
189188
- name: Unit tests (Delta)
190189
run: npm run test:ci:changed
191190
- name: Test All Versions (Delta)
192191
run: npm run test-all-versions:ci:changed
193-
# TODO: remove
194-
- name: List instr files
195-
run: find plugins/node/instrumentation-undici
196-
# TODO: save coverage for later
197192
- name: Upload Test Artifacts
198193
uses: actions/upload-artifact@v4
199194
with:
@@ -205,7 +200,6 @@ jobs:
205200
!node_modules
206201
**/.nyc_output/**
207202
208-
# TODO: how to put back everythign in coverage???
209203
test-coverage-report:
210204
runs-on: ubuntu-latest
211205
needs: unit-and-tav-test
@@ -219,6 +213,7 @@ jobs:
219213
node-version: 18
220214
- name: Install
221215
run: npm ci
216+
# TODO: add the rest of versions (18.19.0 & 20.6.0)? or are these enough??
222217
- name: Download Test Artifacts (18)
223218
uses: actions/download-artifact@v4
224219
with:
@@ -234,9 +229,14 @@ jobs:
234229
with:
235230
name: tests-coverage-cache-${{ github.run_number }}-22
236231
path: .
237-
- name: List instr files
238-
run: find plugins/node/instrumentation-undici
239-
# - name: Report Coverage
232+
- name: List instr folders
233+
run: ls -la plugins/node/instrumentation-undici
234+
- name: Merge coverage
235+
run: cd plugins/node/instrumentation-undici && npm run coverage:merge
236+
- name: Check coverage
237+
run: find plugins/node/instrumentation-undici/coverage
238+
239+
# - name: Report Coverage
240240
# uses: codecov/codecov-action@v5
241241
# env:
242242
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

plugins/node/instrumentation-undici/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"lint": "eslint . --ext .ts",
1717
"lint:fix": "eslint . --ext .ts --fix",
1818
"watch": "tsc -w",
19-
"version:update": "node ../../../scripts/version-update.js"
19+
"version:update": "node ../../../scripts/version-update.js",
20+
"coverage:merge": "nyc merge .nyc_output coverage/coverage-final.json"
2021
},
2122
"keywords": [
2223
"opentelemetry",

0 commit comments

Comments
 (0)