2121 - name : Setup Go
2222 uses : actions/setup-go@v2
2323 with :
24- go-version : 1.22.7
24+ go-version : 1.24.0
2525 - name : Setup Golang caches
2626 uses : actions/cache@v3
2727 with :
3333 ${{ runner.os }}-golang-
3434 - name : Build check
3535 run : make binaries
36- test :
36+ - name : Upload build artifacts
37+ uses : actions/upload-artifact@v4
38+ with :
39+ name : binaries
40+ path : |
41+ cloud/aws/bin/
42+ cloud/gcp/bin/
43+ cloud/azure/bin/
44+ retention-days : 1
45+
46+ # Jobs that can run independently without build dependencies
47+ security :
3748 runs-on : ubuntu-latest
3849 env :
3950 GOPATH : /home/runner/go
@@ -43,32 +54,104 @@ jobs:
4354 - name : Setup Go
4455 uses : actions/setup-go@v2
4556 with :
46- go-version : 1.22.7
57+ go-version : 1.24.0
58+ - name : Setup Golang caches
59+ uses : actions/cache@v3
60+ with :
61+ path : |
62+ ~/.cache/go-build
63+ ~/go/pkg/mod
64+ key : ${{ runner.os }}-golang-${{ hashFiles('**/go.sum', '**/work.sum') }}
65+ restore-keys : |
66+ ${{ runner.os }}-golang-
67+ - name : Run Gosec Security Scanner
68+ run : make sec
69+
70+ generate-check :
71+ runs-on : ubuntu-latest
72+ env :
73+ GOPATH : /home/runner/go
74+ steps :
75+ - name : Checkout
76+ uses : actions/checkout@v2
77+ - name : Setup Go
78+ uses : actions/setup-go@v2
79+ with :
80+ go-version : 1.24.0
4781 - name : Setup Golang caches
4882 uses : actions/cache@v3
4983 with :
5084 path : |
5185 ~/.cache/go-build
52- ~/.cache/golangci-lint
5386 ~/go/pkg/mod
5487 key : ${{ runner.os }}-golang-${{ hashFiles('**/go.sum', '**/work.sum') }}
5588 restore-keys : |
5689 ${{ runner.os }}-golang-
57- - name : Linting check
58- run : make lint
5990 - name : Generate Sources
6091 run : make generate-sources
6192 - name : Check generated sources
6293 run : |
6394 git add .
6495 git diff --cached --exit-code
65- - name : Run Gosec Security Scanner
66- run : make sec
96+
97+ # Jobs that need build dependencies
98+ lint :
99+ needs : build
100+ runs-on : ubuntu-latest
101+ env :
102+ GOPATH : /home/runner/go
103+ steps :
104+ - name : Checkout
105+ uses : actions/checkout@v2
106+ - name : Setup Go
107+ uses : actions/setup-go@v2
108+ with :
109+ go-version : 1.24.0
110+ - name : Setup Golang caches
111+ uses : actions/cache@v3
112+ with :
113+ path : |
114+ ~/.cache/go-build
115+ ~/.cache/golangci-lint
116+ ~/go/pkg/mod
117+ key : ${{ runner.os }}-golang-${{ hashFiles('**/go.sum', '**/work.sum') }}
118+ restore-keys : |
119+ ${{ runner.os }}-golang-
120+ - name : Download build artifacts
121+ uses : actions/download-artifact@v4
122+ with :
123+ name : binaries
124+ - name : Linting check
125+ run : make lint
126+
127+ test :
128+ needs : build
129+ runs-on : ubuntu-latest
130+ env :
131+ GOPATH : /home/runner/go
132+ steps :
133+ - name : Checkout
134+ uses : actions/checkout@v2
135+ - name : Setup Go
136+ uses : actions/setup-go@v2
137+ with :
138+ go-version : 1.24.0
139+ - name : Setup Golang caches
140+ uses : actions/cache@v3
141+ with :
142+ path : |
143+ ~/.cache/go-build
144+ ~/go/pkg/mod
145+ key : ${{ runner.os }}-golang-${{ hashFiles('**/go.sum', '**/work.sum') }}
146+ restore-keys : |
147+ ${{ runner.os }}-golang-
148+ - name : Download build artifacts
149+ uses : actions/download-artifact@v4
150+ with :
151+ name : binaries
67152 - name : Run Tests
68153 run : make test-coverage
69- - name : Check Dependency Licenses
70- run : make license-check
71- # Upload coverage report if for core
154+ # Upload coverage reports
72155 - name : Upload Coverage Report Core
73156 uses : codecov/codecov-action@v2
74157 with :
@@ -93,3 +176,31 @@ jobs:
93176 token : ${{ secrets.CODECOV_TOKEN }} # not required for public repos
94177 files : ./cloud/azure/all.coverprofile
95178 flags : azure # optional
179+
180+ license-check :
181+ needs : build
182+ runs-on : ubuntu-latest
183+ env :
184+ GOPATH : /home/runner/go
185+ steps :
186+ - name : Checkout
187+ uses : actions/checkout@v2
188+ - name : Setup Go
189+ uses : actions/setup-go@v2
190+ with :
191+ go-version : 1.24.0
192+ - name : Setup Golang caches
193+ uses : actions/cache@v3
194+ with :
195+ path : |
196+ ~/.cache/go-build
197+ ~/go/pkg/mod
198+ key : ${{ runner.os }}-golang-${{ hashFiles('**/go.sum', '**/work.sum') }}
199+ restore-keys : |
200+ ${{ runner.os }}-golang-
201+ - name : Download build artifacts
202+ uses : actions/download-artifact@v4
203+ with :
204+ name : binaries
205+ - name : Check Dependency Licenses
206+ run : make license-check
0 commit comments