This repository was archived by the owner on Jul 12, 2023. It is now read-only.
File tree 8 files changed +164
-205
lines changed
8 files changed +164
-205
lines changed Original file line number Diff line number Diff line change @@ -26,16 +26,10 @@ jobs:
26
26
27
27
- uses : actions/setup-go@v3
28
28
with :
29
- go-version : ' 1.18 '
29
+ go-version : ' 1.19 '
30
30
31
- - uses : actions/cache@v3
32
- with :
33
- path : |
34
- ~/go/pkg/mod
35
- key : ${{ runner.os }}-go-test-${{ hashFiles('**/go.sum') }}
36
- restore-keys : |
37
- ${{ runner.os }}-go-test-
38
- ${{ runner.os }}-go-
31
+ - name : Download modules
32
+ run : go mod download
39
33
40
34
- name : go-test
41
35
shell : bash
@@ -74,16 +68,10 @@ jobs:
74
68
75
69
- uses : actions/setup-go@v3
76
70
with :
77
- go-version : ' 1.18 '
71
+ go-version : ' 1.19 '
78
72
79
- - uses : actions/cache@v3
80
- with :
81
- path : |
82
- ~/go/pkg/mod
83
- key : ${{ runner.os }}-go-lint-${{ hashFiles('**/go.sum') }}
84
- restore-keys : |
85
- ${{ runner.os }}-go-lint-
86
- ${{ runner.os }}-go-
73
+ - name : Download modules
74
+ run : go mod download
87
75
88
76
- name : go-lint
89
77
shell : bash
Original file line number Diff line number Diff line change @@ -18,12 +18,24 @@ GO_FILES = $(shell find . -name \*.go)
18
18
MD_FILES = $(shell find . -name \* .md)
19
19
PO_FILES = $(shell find . -name \* .po)
20
20
21
+ # diff-check runs git-diff and fails if there are any changes.
22
+ diff-check :
23
+ @FINDINGS=" $$ (git status -s -uall)" ; \
24
+ if [ -n " $$ {FINDINGS}" ]; then \
25
+ echo " Changed files:\n\n" ; \
26
+ echo " $$ {FINDINGS}\n\n" ; \
27
+ echo " Diffs:\n\n" ; \
28
+ git diff ; \
29
+ git diff --cached ; \
30
+ exit 1 ; \
31
+ fi
32
+ .PHONY : diff-check
33
+
21
34
generate :
22
35
@go generate ./...
23
36
.PHONY : generate
24
37
25
- generate-check : generate
26
- @git update-index --refresh && git diff-index --quiet HEAD --
38
+ generate-check : generate diff-check
27
39
.PHONY : generate-check
28
40
29
41
# lint uses the same linter as CI and tries to report the same results running
You can’t perform that action at this time.
0 commit comments