Skip to content

Commit 2de2ebc

Browse files
committed
feat: add code coverage
1 parent c58a6aa commit 2de2ebc

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

.cirrus.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,22 @@ jammy_task:
1919
--local_resources=cpu=8
2020
--remote_cache=http://$CIRRUS_HTTP_CACHE_HOST
2121
//...
22+
- apt update && apt install -y lcov
23+
- bazel coverage
24+
--local_resources=ram=24000
25+
--local_resources=cpu=8
26+
--remote_cache=http://$CIRRUS_HTTP_CACHE_HOST
27+
//...
28+
- genhtml --branch-coverage
29+
--output genhtml
30+
"$(bazel info output_path)/_coverage/_coverage_report.dat"
2231
always:
2332
jammy_test_artifacts:
2433
path: "bazel-testlogs/**/test.xml"
2534
format: junit
35+
jammy_coverage_artifacts:
36+
path: "genhtml/index.html"
37+
type: text/html
2638

2739
noble_task:
2840
timeout_in: 120m
@@ -44,7 +56,19 @@ noble_task:
4456
--local_resources=cpu=8
4557
--remote_cache=http://$CIRRUS_HTTP_CACHE_HOST
4658
//...
59+
- apt update && apt install -y lcov
60+
- bazel coverage
61+
--local_resources=ram=24000
62+
--local_resources=cpu=8
63+
--remote_cache=http://$CIRRUS_HTTP_CACHE_HOST
64+
//...
65+
- genhtml --branch-coverage
66+
--output genhtml
67+
"$(bazel info output_path)/_coverage/_coverage_report.dat"
4768
always:
4869
noble_test_artifacts:
4970
path: "bazel-testlogs/**/test.xml"
5071
format: junit
72+
noble_coverage_artifacts:
73+
path: "genhtml/index.html"
74+
type: text/html

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
MODULE.bazel.lock
77
**/__pycache__/**
88
.vscode
9-
*.ps
9+
*.ps
10+
genhtml/*

0 commit comments

Comments
 (0)