File tree Expand file tree Collapse file tree 3 files changed +16
-5
lines changed Expand file tree Collapse file tree 3 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,10 @@ name: build
2
2
3
3
on :
4
4
push :
5
- branches :
6
- tags :
5
+ branches : [main]
6
+ tags : ["*"]
7
7
pull_request :
8
+ branches : [main]
8
9
9
10
jobs :
10
11
build :
20
21
- name : checkout
21
22
uses : actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
22
23
23
- - name : build and test
24
+ - name : build, test and generate coverage report
24
25
run : |
25
- go test -timeout=60s -race ./...
26
+ go test -timeout=60s -race -v ./... -coverprofile=coverage.out
26
27
go build -race ./...
27
28
28
29
- name : build and test ARC
31
32
go test -timeout=60s -race
32
33
go build -race
33
34
35
+ - name : Upload the coverage report
36
+ uses : actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
37
+ with :
38
+ path : coverage.out
39
+ name : Coverage-report
40
+
41
+ - name : Display the coverage report
42
+ run : go tool cover -func=coverage.out
43
+
34
44
- name : install golangci-lint
35
45
run : curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $GITHUB_WORKSPACE v1.53.3
36
46
Original file line number Diff line number Diff line change
1
+ 1.19
Original file line number Diff line number Diff line change 1
1
module github.com/hashicorp/golang-lru/v2
2
2
3
- go 1.18
3
+ go 1.19
You can’t perform that action at this time.
0 commit comments