Skip to content

Commit

Permalink
Use monocart for coverage reports, enable codecov (#58850)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebailey authored Jul 17, 2024
1 parent e7e8135 commit ba46eca
Show file tree
Hide file tree
Showing 7 changed files with 316 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .c8rc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"reporter": ["lcovonly", "cobertura"],
"reporter": ["lcovonly", "cobertura", "v8", "codecov"],
"src": "src",
"include": ["src/**", "built/local/**"],
"exclude": ["**/node_modules/**"],
Expand Down
14 changes: 14 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
comment: false

coverage:
precision: 5
status:
patch:
default:
informational: true
project:
default:
informational: true

github_checks:
annotations: false
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,38 @@ jobs:
git add tests/baselines/reference
git diff --staged --exit-code
coverage:
runs-on:
- 'self-hosted'
- '1ES.Pool=TypeScript-1ES-GitHub-Large'
- '1ES.ImageOverride=ubuntu-22.04'

permissions:
id-token: write
contents: read

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: '*'
check-latest: true
- run: npm ci

- name: Run tests with coverage
run: npm test -- --no-lint --coverage

- name: Upload coverage artifact
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: coverage
path: coverage

- uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
use_oidc: true
file: ./coverage/codecov.json

lint:
runs-on: ubuntu-latest

Expand Down
2 changes: 1 addition & 1 deletion knip.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"ignore": [
"scripts/failed-tests.d.cts"
],
"ignoreDependencies": ["c8", "eslint-formatter-autolinkable-stylish", "mocha-fivemat-progress-reporter"],
"ignoreDependencies": ["c8", "eslint-formatter-autolinkable-stylish", "mocha-fivemat-progress-reporter", "monocart-coverage-reports"],
"ignoreExportsUsedInFile": {
"enum": true,
"interface": true,
Expand Down
Loading

0 comments on commit ba46eca

Please sign in to comment.