File tree 1 file changed +17
-12
lines changed
1 file changed +17
-12
lines changed Original file line number Diff line number Diff line change 1
- # This workflow will build a golang project
2
- # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
3
-
4
1
name : Go
5
2
6
3
on :
@@ -14,15 +11,23 @@ jobs:
14
11
build :
15
12
runs-on : ubuntu-latest
16
13
steps :
17
- - uses : actions/checkout@v3
14
+ - uses : actions/checkout@v3
15
+
16
+ - name : Set up Go
17
+ uses : actions/setup-go@v4
18
+ with :
19
+ go-version : ' 1.22'
18
20
19
- - name : Set up Go
20
- uses : actions/setup-go@v4
21
- with :
22
- go-version : ' 1.22'
21
+ - name : Cache Go modules
22
+ uses : actions/cache@v3
23
+ with :
24
+ path : ~/go/pkg/mod
25
+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
26
+ restore-keys : |
27
+ ${{ runner.os }}-go-
23
28
24
- - name : Build
25
- run : go build -v ./...
29
+ - name : Build
30
+ run : go build -v ./...
26
31
27
- - name : Test
28
- run : go test -v ./...
32
+ - name : Test
33
+ run : go test -v -p 2 ./...
You can’t perform that action at this time.
0 commit comments