File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 10
10
with :
11
11
go-version : " 1.22"
12
12
- name : test
13
- run : go test -v ./...
13
+ run : go test -v ./... -covermode=atomic -coverprofile=cover.out
14
+
15
+ - name : upload coverage report
16
+ uses : codecov/codecov-action@v4
17
+ with :
18
+ file : cover.out
19
+ fail_ci_if_error : false
20
+ token : ${{ secrets.CODECOV_TOKEN }}
14
21
15
22
shellcheck :
16
23
name : runner / shellcheck
Original file line number Diff line number Diff line change @@ -112,3 +112,20 @@ install-stest-static:
112
112
$(ENVS_STATIC ) go install -ldflags=" $( LDFLAGS_STATIC) " $(BUILD_FLAGS ) ./cmd/pbm-speed-test
113
113
install-static-entrypoint :
114
114
$(ENVS_STATIC ) go install -ldflags=" $( LDFLAGS_STATIC) " $(BUILD_FLAGS ) ./cmd/pbm-agent-entrypoint
115
+
116
+ # BUILD WITH COVERAGE PROFILING
117
+ build-cover : build-pbm-cover build-agent-cover build-stest-cover
118
+ build-pbm-cover :
119
+ $(ENVS ) go build -cover -ldflags=" $( LDFLAGS) " $(BUILD_FLAGS ) -o ./bin/pbm ./cmd/pbm
120
+ build-agent-cover :
121
+ $(ENVS ) go build -cover -ldflags=" $( LDFLAGS) " $(BUILD_FLAGS ) -o ./bin/pbm-agent ./cmd/pbm-agent
122
+ build-stest-cover :
123
+ $(ENVS ) go build -cover -ldflags=" $( LDFLAGS) " $(BUILD_FLAGS ) -o ./bin/pbm-speed-test ./cmd/pbm-speed-test
124
+
125
+ install-cover : install-pbm-cover install-agent-cover install-stest-cover
126
+ install-pbm-cover :
127
+ $(ENVS ) go install -cover -ldflags=" $( LDFLAGS) " $(BUILD_FLAGS ) ./cmd/pbm
128
+ install-agent-cover :
129
+ $(ENVS ) go install -cover -ldflags=" $( LDFLAGS) " $(BUILD_FLAGS ) ./cmd/pbm-agent
130
+ install-stest-cover :
131
+ $(ENVS ) go install -cover -ldflags=" $( LDFLAGS) " $(BUILD_FLAGS ) ./cmd/pbm-speed-test
You can’t perform that action at this time.
0 commit comments