File tree 4 files changed +32
-25
lines changed
4 files changed +32
-25
lines changed Original file line number Diff line number Diff line change @@ -11,22 +11,32 @@ jobs:
11
11
steps :
12
12
- name : checkout source code
13
13
uses : actions/checkout@master
14
+
14
15
- name : setup go environment
15
16
uses : actions/setup-go@v1
16
17
with :
17
18
go-version : ' 1.17.2'
19
+
20
+ - name : create go.mod
21
+ run : |
22
+ # Fix for "cannot find main module" issue
23
+ go mod init github.com/opencontainers/runtime-spec
24
+
25
+ go get -d ./schema/...
26
+
27
+ - name : run golangci-lint
28
+ uses : golangci/golangci-lint-action@v3
29
+ with :
30
+ version : v1.51.2
31
+ args : --verbose
32
+
18
33
- name : run tests
19
34
run : |
20
35
export PATH="$(go env GOPATH)/bin:${PATH}"
21
36
set -x
22
37
make install.tools
23
38
24
- # Fix for "cannot find main module" issue
25
- go mod init github.com/opencontainers/runtime-spec
26
-
27
- go get -d ./schema/...
28
39
make .govet
29
- make .golint
30
40
31
41
make .gitvalidation
32
42
make docs
Original file line number Diff line number Diff line change @@ -11,22 +11,32 @@ jobs:
11
11
steps :
12
12
- name : checkout source code
13
13
uses : actions/checkout@master
14
+
14
15
- name : setup go environment
15
16
uses : actions/setup-go@v1
16
17
with :
17
18
go-version : ' 1.17.2'
19
+
20
+ - name : create go.mod
21
+ run : |
22
+ # Fix for "cannot find main module" issue
23
+ go mod init github.com/opencontainers/runtime-spec
24
+
25
+ go get -d ./schema/...
26
+
27
+ - name : run golangci-lint
28
+ uses : golangci/golangci-lint-action@v3
29
+ with :
30
+ version : v1.51.2
31
+ args : --verbose
32
+
18
33
- name : run tests
19
34
run : |
20
35
export PATH="$(go env GOPATH)/bin:${PATH}"
21
36
set -x
22
37
make install.tools
23
38
24
- # Fix for "cannot find main module" issue
25
- go mod init github.com/opencontainers/runtime-spec
26
-
27
- go get -d ./schema/...
28
39
make .govet
29
- make .golint
30
40
31
41
make .gitvalidation
32
42
make docs
Original file line number Diff line number Diff line change
1
+ //go:build ignore
1
2
// +build ignore
2
3
3
4
package main
Original file line number Diff line number Diff line change @@ -61,14 +61,6 @@ test: .govet .golint .gitvalidation
61
61
.govet :
62
62
go vet -x ./...
63
63
64
- # `go get github.com/golang/lint/golint`
65
- .golint :
66
- ifeq ($(call ALLOWED_GO_VERSION,1.7,$(HOST_GOLANG_VERSION ) ) ,true)
67
- @which golint > /dev/null 2>/dev/null || (echo "ERROR: golint not found. Consider 'make install.tools' target" && false)
68
- golint ./...
69
- endif
70
-
71
-
72
64
# When this is running in GitHub, it will only check the GitHub commit range
73
65
.gitvalidation :
74
66
@which git-validation > /dev/null 2> /dev/null || (echo " ERROR: git-validation not found. Consider 'make install.tools' target" && false)
78
70
git-validation -v -run DCO,short-subject,dangling-whitespace -range $(EPOCH_TEST_COMMIT)..HEAD
79
71
endif
80
72
81
- install.tools : .install.golint .install.gitvalidation
82
-
83
- # golint does not even build for <go1.7
84
- .install.golint :
85
- ifeq ($(call ALLOWED_GO_VERSION,1.7,$(HOST_GOLANG_VERSION ) ) ,true)
86
- go get -u golang.org/x/lint/golint
87
- endif
73
+ install.tools : .install.gitvalidation
88
74
89
75
.install.gitvalidation :
90
76
go get -u github.com/vbatts/git-validation
You can’t perform that action at this time.
0 commit comments