File tree Expand file tree Collapse file tree 1 file changed +24
-9
lines changed
Expand file tree Collapse file tree 1 file changed +24
-9
lines changed Original file line number Diff line number Diff line change @@ -10,15 +10,30 @@ jobs:
1010 build :
1111 runs-on : ubuntu-latest
1212 steps :
13- - uses : actions/checkout@v4
13+ - name : Checkout code
14+ uses : actions/checkout@v4
1415
15- - name : Set up Go
16- uses : actions/setup-go@v4
17- with :
18- go-version : ' 1.21'
16+ - name : Set up Go
17+ uses : actions/setup-go@v4
18+ with :
19+ go-version : ' 1.21'
1920
20- - name : Build
21- run : go build -v ./...
21+ - name : Cache Go modules
22+ uses : actions/cache@v4
23+ with :
24+ path : |
25+ ~/.cache/go-build
26+ # go mod cache path
27+ ~/go/pkg/mod
28+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
29+ restore-keys : |
30+ ${{ runner.os }}-go-
2231
23- - name : Test
24- run : go test -v ./...
32+ - name : Download dependencies
33+ run : go mod download
34+
35+ - name : Build
36+ run : go build -v ./...
37+
38+ - name : Test
39+ run : go test -v ./...
You can’t perform that action at this time.
0 commit comments