File tree Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change 30
30
run : go mod download
31
31
32
32
- name : Cache / restore go modules
33
- uses : actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3 .2.6
33
+ uses : actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4 .2.0
34
34
with :
35
35
path : |
36
36
~/go/pkg/mod
48
48
echo "$files"
49
49
exit 1
50
50
fi
51
+
52
+ - name : Run golangci-lint
53
+ uses : golangci/golangci-lint-action@08e2f20817b15149a52b5b3ebe7de50aff2ba8c5
51
54
52
55
# Install gotestsum with go get for 1.15.3; otherwise default to go install
53
56
- name : Install gotestsum
@@ -64,11 +67,20 @@ jobs:
64
67
- name : Run go tests
65
68
run : |
66
69
PACKAGE_NAMES=$(go list ./...)
67
- gotestsum --format=short-verbose --junitfile $TEST_RESULTS/gotestsum-report.xml -- $PACKAGE_NAMES
70
+ gotestsum --format=short-verbose --junitfile $TEST_RESULTS/gotestsum-report.xml -- -p 2 -cover -coverprofile=coverage.out $PACKAGE_NAMES
68
71
69
72
# Save coverage report parts
70
73
- name : Upload and save artifacts
71
- uses : actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
74
+ uses : actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
75
+ with :
76
+ name : Test Results-${{matrix.go-version}}
77
+ path : ${{ env.TEST_RESULTS }}
78
+
79
+ - name : Upload coverage report
80
+ uses : actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
72
81
with :
73
- name : Test Results
74
- path : ${{ env.TEST_RESULTS }}
82
+ path : coverage.out
83
+ name : Coverage-report-${{matrix.go-version}}
84
+
85
+ - name : Display coverage report
86
+ run : go tool cover -func=coverage.out
Original file line number Diff line number Diff line change @@ -389,7 +389,7 @@ func (v *Version) String() string {
389
389
str := strconv .FormatInt (s , 10 )
390
390
fmtParts [i ] = str
391
391
}
392
- fmt .Fprintf (& buf , strings .Join (fmtParts , "." ))
392
+ fmt .Fprintf (& buf , "%s" , strings .Join (fmtParts , "." ))
393
393
if v .pre != "" {
394
394
fmt .Fprintf (& buf , "-%s" , v .pre )
395
395
}
You can’t perform that action at this time.
0 commit comments