Skip to content

Commit

Permalink
Add: codecov configuration.
Browse files Browse the repository at this point in the history
Signed-off-by: xuezhaojun <zxue@redhat.com>
  • Loading branch information
xuezhaojun committed Jun 5, 2023
1 parent d21057c commit 3afc5d0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
coverage:
status:
patch: off # disable patch status, https://docs.codecov.com/docs/commit-status#patch-status
project:
default:
target: auto
threshold: 1%

ignore:
- "**/*generated*.go"
9 changes: 9 additions & 0 deletions .github/workflows/pre.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ jobs:
go-version: ${{ env.GO_VERSION }}
- name: unit
run: make test
- name: report coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_UPLOAD_TOKEN }}
files: ./coverage.out
flags: unit
name: unit
verbose: true
fail_ci_if_error: true

integration:
name: integration
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ endif

# Add packages to do unit test
GO_TEST_PACKAGES :=./pkg/...
GO_TEST_FLAGS := -race -coverprofile=coverage.out

IMAGE_REGISTRY?=quay.io/open-cluster-management
IMAGE_TAG?=latest
Expand Down

0 comments on commit 3afc5d0

Please sign in to comment.