Skip to content

Commit ca0444f

Browse files
authored
Merge pull request #180 from thaJeztah/add_codecov
gha: add codecov
2 parents 8698290 + f5305ce commit ca0444f

File tree

4 files changed

+22
-1
lines changed

4 files changed

+22
-1
lines changed

.github/codecov.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
comment: false
2+
3+
github_checks:
4+
annotations: false
5+
6+
coverage:
7+
status:
8+
patch: false
9+
# project will give us the diff in the total code coverage between a commit
10+
# and its parent
11+
project:
12+
default:
13+
target: auto
14+
threshold: "15%"
15+
changes: false

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ jobs:
4444
run: |
4545
uname -a
4646
make test
47+
- name: Send to Codecov
48+
uses: codecov/codecov-action@v5
49+
with:
50+
token: ${{ secrets.CODECOV_TOKEN }} # used to upload coverage reports: https://github.com/moby/buildkit/pull/4660#issue-2142122533
4751

4852
codespell:
4953
runs-on: ubuntu-24.04

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/_build/
22
/mount/go-local.*
3+
coverage.txt

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ all: clean lint test cross
1111
.PHONY: clean
1212
clean:
1313
$(RM) mount/go-local.*
14+
$(RM) */coverage.txt
1415

1516
.PHONY: foreach
1617
foreach: ## Run $(CMD) for every package.
@@ -25,7 +26,7 @@ foreach: ## Run $(CMD) for every package.
2526

2627
.PHONY: test
2728
test: test-local
28-
test: CMD=go test $(RUN_VIA_SUDO) -v .
29+
test: CMD=go test $(RUN_VIA_SUDO) -v -coverprofile=coverage.txt -covermode=atomic .
2930
test: foreach
3031

3132
# Test the mount module against the local mountinfo source code instead of the

0 commit comments

Comments
 (0)