Skip to content

Commit 390410f

Browse files
author
Vitaly Isaev
committed
MLN-7315 | feat: overall test coverage
1 parent 8ca20e6 commit 390410f

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,7 @@ jobs:
2727
run: make build
2828

2929
- name: Test
30-
run: |
31-
go test -v ./... -covermode=count -coverprofile=coverage.out
32-
go tool cover -func=coverage.out -o=coverage.out
33-
34-
- name: check
35-
run: |
36-
echo $GOPATH
37-
pwd
38-
ls -l .
30+
run: make test_coverage
3931

4032
- name: Go Coverage Badge # Pass the `coverage.out` output to this action
4133
uses: tj-actions/coverage-badge-go@v1.2

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ integration_test:
1010
go test -c ./test/allocator -o ./test/allocator/allocator-test -coverpkg ./...
1111
./test/allocator/allocator-test -test.v -test.coverprofile=coverage.integration.out
1212

13-
coverage:
14-
go tool cover -func=coverage.integration.out -o=coverage.out
13+
test_coverage: unit_test integration_test
14+
cp coverage.unit.out coverage.out
15+
tail --lines=+2 coverage.integration.out >> coverage.out
16+
go tool cover -func=coverage.out -o=coverage.out
1517

1618
lint:
1719
golangci-lint run -c .golangci.yml ./...

0 commit comments

Comments
 (0)