Skip to content

Commit

Permalink
Merge pull request #180 from thaJeztah/add_codecov
Browse files Browse the repository at this point in the history
gha: add codecov
  • Loading branch information
thaJeztah authored Dec 18, 2024
2 parents 8698290 + f5305ce commit ca0444f
Show file tree
Hide file tree
Showing 4 changed files with 22 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
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ 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

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 ca0444f

Please sign in to comment.