File tree Expand file tree Collapse file tree 4 files changed +11
-9
lines changed Expand file tree Collapse file tree 4 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -41,17 +41,17 @@ jobs:
41
41
run : >
42
42
go test -v
43
43
-covermode=atomic
44
- -coverprofile="coverage.out"
44
+ -coverprofile="coverage/coverage .out"
45
45
./exercises/...
46
46
47
47
- name : Coverage
48
- run : go tool cover -func="coverage.out"
48
+ run : go tool cover -func="coverage/coverage .out"
49
49
50
50
- name : Upload coverage artifact
51
51
uses : actions/upload-artifact@v4
52
52
with :
53
53
name : coverage-report
54
- path : coverage.out
54
+ path : coverage
55
55
56
56
codecov :
57
57
name : Upload to Codecov
63
63
uses : actions/download-artifact@v5
64
64
with :
65
65
name : coverage-report
66
- path : coverage.out
66
+ path : coverage
67
67
68
68
- name : Upload coverage reports to Codecov with GitHub Action
69
69
uses : codecov/codecov-action@v5
86
86
uses : actions/download-artifact@v5
87
87
with :
88
88
name : coverage-report
89
- path : coverage.out
89
+ path : coverage
90
90
91
91
- name : SonarQube Scan
92
92
uses : SonarSource/sonarqube-scan-action@master
Original file line number Diff line number Diff line change @@ -81,6 +81,8 @@ COPY ./go.mod ${WORKDIR}/
81
81
COPY ./go.sum ${WORKDIR}/
82
82
COPY ./Makefile ${WORKDIR}/
83
83
84
+ RUN mkdir ${WORKDIR}/coverage
85
+
84
86
# CMD []
85
87
# ##############################################################################
86
88
FROM development AS builder
Original file line number Diff line number Diff line change @@ -88,15 +88,15 @@ format:
88
88
$(GO ) run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix ./...
89
89
90
90
coverage.out : env dependencies
91
- $(GOTEST ) -v -covermode=atomic -coverprofile=" coverage.out" ./exercises/...
91
+ $(GOTEST ) -v -covermode=atomic -coverprofile=" coverage/coverage .out" ./exercises/...
92
92
93
93
test : env dependencies coverage.out
94
- $(GOCOVER ) -func=coverage.out
94
+ $(GOCOVER ) -func=coverage/coverage .out
95
95
96
96
coverage : test
97
97
98
98
coverage/html : coverage.out
99
- $(GOCOVER ) -html=coverage.out -o ./coverage/coverage.html
99
+ $(GOCOVER ) -html=coverage/coverage .out -o ./coverage/coverage.html
100
100
open ./coverage/coverage.html
101
101
102
102
outdated :
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ sonar.exclusions=
12
12
sonar.tests =exercises
13
13
sonar.test.inclusions =**/*_test.go
14
14
15
- sonar.go.coverage.reportPaths =coverage.out
15
+ sonar.go.coverage.reportPaths =coverage/coverage .out
16
16
17
17
# Encoding of the source code. Default is default system encoding
18
18
sonar.sourceEncoding =UTF-8
You can’t perform that action at this time.
0 commit comments