Skip to content
This repository was archived by the owner on Jan 20, 2026. It is now read-only.

Commit 5252073

Browse files
authored
Merge pull request #93 from sei-protocol/uday/codecov
[SEI-9787] require 70% patch coverage
2 parents ca514d7 + 8cace29 commit 5252073

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/unit_tests.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ jobs:
2020
- name: Run Go Tests
2121
run: |
2222
make test-all
23+
- uses: actions/upload-artifact@v4
24+
with:
25+
name: "${{ github.sha }}-coverage"
26+
path: ./profile.out
2327

2428
upload-coverage-report:
2529
needs: tests
@@ -32,7 +36,7 @@ jobs:
3236

3337
# Download all coverage reports from the 'tests' job
3438
- name: Download coverage reports
35-
uses: actions/download-artifact@v3
39+
uses: actions/download-artifact@v4
3640

3741
- name: Set GOPATH
3842
run: echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
@@ -56,7 +60,7 @@ jobs:
5660

5761
# Now we upload the merged report to Codecov
5862
- name: Upload coverage to Codecov
59-
uses: codecov/codecov-action@v3
63+
uses: codecov/codecov-action@v4
6064
with:
6165
file: ./coverage.txt
6266
token: ${{ secrets.CODECOV_TOKEN }}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ BUILD_FLAGS := -tags "$(build_tags)" -ldflags '$(ldflags)'
5757

5858

5959
test-all:
60-
go test -v -mod=readonly ./... -covermode=atomic
60+
go test -v -mod=readonly ./... -covermode=atomic -coverprofile=./profile.out
6161

6262
lint-all:
6363
golangci-lint run --config=.golangci.yml

codecov.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ coverage:
66
default:
77
target: 60%
88
threshold: 1% # allow this much decrease on project
9+
patch:
10+
default:
11+
target: 70%
912

1013
comment:
1114
layout: "reach,diff,flags,tree,betaprofiling"

0 commit comments

Comments
 (0)