@@ -19,80 +19,92 @@ jobs:
1919 name : build
2020 runs-on : ubuntu-latest
2121 steps :
22- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2 .2
23- - uses : actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3 .0
24- with :
25- go-version-file : " go.mod"
26- - name : build
27- run : |
28- go build -v ./...
22+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0 .2
23+ - uses : actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2 .0
24+ with :
25+ go-version-file : " go.mod"
26+ - name : build
27+ run : |
28+ go build -v ./...
2929 linting :
3030 needs : [build]
3131 name : lint
3232 runs-on : ubuntu-latest
3333 steps :
34- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
35- - uses : actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
36- with :
37- go-version-file : " go.mod"
38- - name : gofmt
39- run : |
40- gofmt_out=$(gofmt -d $(find * -name '*.go' ! -path 'vendor/*' ! -path 'third_party/*'))
41- if [[ -n "$gofmt_out" ]]; then
42- failed=1
43- fi
44- echo "$gofmt_out"
45- - name : golangci-lint
46- uses : golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
47- with :
48- version : v2.1.6
49- only-new-issues : true
50- args : --timeout=10m
51- - name : yamllint
52- run : |
53- apt update && apt install -y yamllint
54- yamllint -c .yamllint $(find . -path ./vendor -prune -o -type f -regex ".*y[a]ml" -print | tr '\n' ' ')
55- - name : check-license
56- run : |
57- go install github.com/google/go-licenses@v1.0.0
58- go-licenses check ./...
34+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
35+ with :
36+ fetch-depth : 0
37+ - uses : actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
38+ with :
39+ go-version-file : " go.mod"
40+ - name : gofmt
41+ run : |
42+ gofmt_out=$(gofmt -d $(find * -name '*.go' ! -path 'vendor/*' ! -path 'third_party/*'))
43+ if [[ -n "$gofmt_out" ]]; then
44+ failed=1
45+ fi
46+ echo "$gofmt_out"
47+ - name : golangci-lint
48+ uses : golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
49+ with :
50+ version : v2.7.2
51+ args : --new-from-merge-base=origin/${{ github.base_ref }} --timeout=10m
52+ - name : yamllint
53+ run : |
54+ apt update && apt install -y yamllint
55+ yamllint -c .yamllint $(find . -path ./vendor -prune -o -type f -regex ".*y[a]ml" -print | tr '\n' ' ')
56+ - name : check-license
57+ run : |
58+ go install github.com/google/go-licenses@v1.0.0
59+ go-licenses check ./...
5960 tests :
6061 needs : [build]
6162 name : test
6263 runs-on : ubuntu-latest
6364 steps :
64- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2 .2
65- - uses : actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3 .0
66- with :
67- go-version-file : " go.mod"
68- - name : build
69- run : |
70- make test-unit-verbose-and-race
65+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0 .2
66+ - uses : actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2 .0
67+ with :
68+ go-version-file : " go.mod"
69+ - name : build
70+ run : |
71+ make test-unit-verbose-and-race
7172 generated :
7273 needs : [build]
7374 name : Check generated code
7475 runs-on : ubuntu-latest
7576 steps :
76- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2 .2
77- - uses : actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3 .0
78- with :
79- go-version-file : " go.mod"
80- - name : generated
81- run : |
82- go install github.com/google/go-licenses@v1.0.0 # Not sure why it is needed here
83- ./hack/verify-codegen.sh
77+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0 .2
78+ - uses : actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2 .0
79+ with :
80+ go-version-file : " go.mod"
81+ - name : generated
82+ run : |
83+ go install github.com/google/go-licenses@v1.0.0 # Not sure why it is needed here
84+ ./hack/verify-codegen.sh
8485 multi-arch-build :
8586 needs : [build]
8687 name : Multi-arch build
8788 runs-on : ubuntu-latest
8889 steps :
89- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
90- - uses : actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
91- with :
92- go-version-file : " go.mod"
93- - name : make cross
94- run : |
95- make cross
90+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
91+ - uses : actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
92+ with :
93+ go-version-file : " go.mod"
94+ - name : Free disk space
95+ run : |
96+ echo "--- Disk space before cleanup ---"
97+ df -h
98+ sudo rm -rf /usr/share/dotnet
99+ sudo rm -rf /usr/local/lib/android
100+ sudo rm -rf /opt/ghc
101+ sudo rm -rf /opt/hostedtoolcache/CodeQL
102+ sudo docker image prune -a -f
103+ echo "--- Disk space after cleanup ---"
104+ df -h
105+ - name : make cross
106+ run : |
107+ make cross
96108 e2e-tests :
97109 needs : [build]
98110 uses : ./.github/workflows/e2e-matrix.yml
0 commit comments