Skip to content

Commit ba46eca

Browse files
authored
Use monocart for coverage reports, enable codecov (#58850)
1 parent e7e8135 commit ba46eca

File tree

7 files changed

+316
-18
lines changed

7 files changed

+316
-18
lines changed

.c8rc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"reporter": ["lcovonly", "cobertura"],
2+
"reporter": ["lcovonly", "cobertura", "v8", "codecov"],
33
"src": "src",
44
"include": ["src/**", "built/local/**"],
55
"exclude": ["**/node_modules/**"],

.github/codecov.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
comment: false
2+
3+
coverage:
4+
precision: 5
5+
status:
6+
patch:
7+
default:
8+
informational: true
9+
project:
10+
default:
11+
informational: true
12+
13+
github_checks:
14+
annotations: false

.github/workflows/ci.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,38 @@ jobs:
6969
git add tests/baselines/reference
7070
git diff --staged --exit-code
7171
72+
coverage:
73+
runs-on:
74+
- 'self-hosted'
75+
- '1ES.Pool=TypeScript-1ES-GitHub-Large'
76+
- '1ES.ImageOverride=ubuntu-22.04'
77+
78+
permissions:
79+
id-token: write
80+
contents: read
81+
82+
steps:
83+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
84+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
85+
with:
86+
node-version: '*'
87+
check-latest: true
88+
- run: npm ci
89+
90+
- name: Run tests with coverage
91+
run: npm test -- --no-lint --coverage
92+
93+
- name: Upload coverage artifact
94+
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
95+
with:
96+
name: coverage
97+
path: coverage
98+
99+
- uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
100+
with:
101+
use_oidc: true
102+
file: ./coverage/codecov.json
103+
72104
lint:
73105
runs-on: ubuntu-latest
74106

knip.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"ignore": [
2929
"scripts/failed-tests.d.cts"
3030
],
31-
"ignoreDependencies": ["c8", "eslint-formatter-autolinkable-stylish", "mocha-fivemat-progress-reporter"],
31+
"ignoreDependencies": ["c8", "eslint-formatter-autolinkable-stylish", "mocha-fivemat-progress-reporter", "monocart-coverage-reports"],
3232
"ignoreExportsUsedInFile": {
3333
"enum": true,
3434
"interface": true,

0 commit comments

Comments
 (0)