Skip to content

Commit

Permalink
gha: add codecov
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Dec 18, 2024
1 parent 8698290 commit 857a4e0
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
comment: false

github_checks:
annotations: false

coverage:
status:
patch: false
# project will give us the diff in the total code coverage between a commit
# and its parent
project:
default:
target: auto
threshold: "15%"
changes: false
5 changes: 5 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ jobs:
run: |
uname -a
make test
- name: Send to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }} # used to upload coverage reports: https://github.com/moby/buildkit/pull/4660#issue-2142122533
# files: coverage.txt

codespell:
runs-on: ubuntu-24.04
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/_build/
/mount/go-local.*
coverage.txt
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ all: clean lint test cross
.PHONY: clean
clean:
$(RM) mount/go-local.*
$(RM) */coverage.txt

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

.PHONY: test
test: test-local
test: CMD=go test $(RUN_VIA_SUDO) -v .
test: CMD=go test $(RUN_VIA_SUDO) -v -coverprofile=coverage.txt -covermode=atomic .
test: foreach

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

0 comments on commit 857a4e0

Please sign in to comment.