Skip to content

Commit 800f196

Browse files
committed
ci: coverage
1 parent cce6c58 commit 800f196

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed

Diff for: .github/workflows/test-all-packages.yml

+31-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616
DATADOG_SITE: us3.datadoghq.com
1717
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
1818
TEST_COLLECT: 'tee -a _testoutput.txt'
19-
19+
NODE_V8_COVERAGE: coverage
2020
# this is required, since explicitly setting bash as shell enables pipefail, which is not
2121
# on by default. This is required to fail correctly when teeing output to a file to collect
2222
# test instrumentation
@@ -149,6 +149,9 @@ jobs:
149149
if [ "$DATADOG_API_KEY" != "" ]; then
150150
./scripts/ci-collect-testruns.sh && npx @datadog/datadog-ci junit upload --service agoric-sdk ./packages/*/junit.xml
151151
fi
152+
- name: Upload coverage reports to Codecov
153+
if: success() || failure()
154+
uses: codecov/codecov-action@v3
152155

153156
test-quick2:
154157
# BEGIN-TEST-BOILERPLATE
@@ -216,6 +219,9 @@ jobs:
216219
if [ "$DATADOG_API_KEY" != "" ]; then
217220
./scripts/ci-collect-testruns.sh && npx @datadog/datadog-ci junit upload --service agoric-sdk ./packages/*/junit.xml
218221
fi
222+
- name: Upload coverage reports to Codecov
223+
if: success() || failure()
224+
uses: codecov/codecov-action@v3
219225

220226
##############
221227
# Long-running tests are executed individually.
@@ -248,6 +254,9 @@ jobs:
248254
if [ "$DATADOG_API_KEY" != "" ]; then
249255
./scripts/ci-collect-testruns.sh && npx @datadog/datadog-ci junit upload --service agoric-sdk ./packages/*/junit.xml
250256
fi
257+
- name: Upload coverage reports to Codecov
258+
if: success() || failure()
259+
uses: codecov/codecov-action@v3
251260

252261
test-cosmic-swingset:
253262
# BEGIN-TEST-BOILERPLATE
@@ -280,6 +289,9 @@ jobs:
280289
if [ "$DATADOG_API_KEY" != "" ]; then
281290
./scripts/ci-collect-testruns.sh && npx @datadog/datadog-ci junit upload --service agoric-sdk ./packages/*/junit.xml
282291
fi
292+
- name: Upload coverage reports to Codecov
293+
if: success() || failure()
294+
uses: codecov/codecov-action@v3
283295

284296
# The test-swingset* tests are split by alphabetical test name.
285297
test-swingset:
@@ -310,6 +322,9 @@ jobs:
310322
if [ "$DATADOG_API_KEY" != "" ]; then
311323
./scripts/ci-collect-testruns.sh && npx @datadog/datadog-ci junit upload --service agoric-sdk ./packages/*/junit.xml
312324
fi
325+
- name: Upload coverage reports to Codecov
326+
if: success() || failure()
327+
uses: codecov/codecov-action@v3
313328

314329
test-swingset2:
315330
# BEGIN-TEST-BOILERPLATE
@@ -347,6 +362,9 @@ jobs:
347362
if [ "$DATADOG_API_KEY" != "" ]; then
348363
./scripts/ci-collect-testruns.sh && npx @datadog/datadog-ci junit upload --service agoric-sdk ./packages/*/junit.xml
349364
fi
365+
- name: Upload coverage reports to Codecov
366+
if: success() || failure()
367+
uses: codecov/codecov-action@v3
350368

351369
test-swingset3:
352370
# BEGIN-TEST-BOILERPLATE
@@ -375,6 +393,9 @@ jobs:
375393
if [ "$DATADOG_API_KEY" != "" ]; then
376394
./scripts/ci-collect-testruns.sh && npx @datadog/datadog-ci junit upload --service agoric-sdk ./packages/*/junit.xml
377395
fi
396+
- name: Upload coverage reports to Codecov
397+
if: success() || failure()
398+
uses: codecov/codecov-action@v3
378399

379400
test-swingset4:
380401
# BEGIN-TEST-BOILERPLATE
@@ -404,6 +425,9 @@ jobs:
404425
if [ "$DATADOG_API_KEY" != "" ]; then
405426
./scripts/ci-collect-testruns.sh && npx @datadog/datadog-ci junit upload --service agoric-sdk ./packages/*/junit.xml
406427
fi
428+
- name: Upload coverage reports to Codecov
429+
if: success() || failure()
430+
uses: codecov/codecov-action@v3
407431

408432
test-zoe-unit:
409433
# BEGIN-TEST-BOILERPLATE
@@ -435,6 +459,9 @@ jobs:
435459
if [ "$DATADOG_API_KEY" != "" ]; then
436460
./scripts/ci-collect-testruns.sh && npx @datadog/datadog-ci junit upload --service agoric-sdk ./packages/*/junit.xml
437461
fi
462+
- name: Upload coverage reports to Codecov
463+
if: success() || failure()
464+
uses: codecov/codecov-action@v3
438465

439466
test-zoe-swingset:
440467
# BEGIN-TEST-BOILERPLATE
@@ -466,6 +493,9 @@ jobs:
466493
if [ "$DATADOG_API_KEY" != "" ]; then
467494
./scripts/ci-collect-testruns.sh && npx @datadog/datadog-ci junit upload --service agoric-sdk ./packages/*/junit.xml
468495
fi
496+
- name: Upload coverage reports to Codecov
497+
if: success() || failure()
498+
uses: codecov/codecov-action@v3
469499

470500
test-docker-build:
471501
runs-on: ubuntu-latest

Diff for: codecov.yaml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
codecov:
2+
require_ci_to_pass: false
3+
comment:
4+
behavior: default
5+
layout: reach,diff,flags,tree,reach
6+
show_carryforward_flags: false
7+
coverage:
8+
precision: 2
9+
range:
10+
- 60.0
11+
- 80.0
12+
round: down
13+
status:
14+
changes: false
15+
default_rules:
16+
flag_coverage_not_uploaded_behavior: include
17+
patch: true
18+
project: true
19+
github_checks:
20+
annotations: true
21+
parsers:
22+
javascript:
23+
enable_partials: yes

0 commit comments

Comments
 (0)