Skip to content

Commit d55ebe7

Browse files
committed
add go-test in Makefile for local use
1 parent 63129d3 commit d55ebe7

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
env:
4343
GOMAXPROCS: 4
4444
GOMEMLIMIT: 8192MiB
45-
run: make test
45+
run: make go-test
4646

4747
- name: Send coverage
4848
uses: coverallsapp/github-action@v2

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,14 @@ crd: controller-gen-install
7474
#? test: The verify target runs tasks similar to the CI tasks, but without code coverage
7575
.PHONY: test
7676
test:
77+
go test -race ./...
78+
79+
80+
.PHONY: test
81+
go-test:
7782
go test -race -coverprofile=profile.cov ./...
83+
go tool cover -func=profile.cov > coverage.summary
84+
@tail -n 1 coverage.summary
7885

7986
#? build: The build targets allow to build the binary and container image
8087
.PHONY: build

0 commit comments

Comments
 (0)