File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 1212 strategy :
1313 fail-fast : true
1414 matrix :
15+ go : ['1.14', '1.x']
1516 # Locked at https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
1617 os :
1718 - ubuntu-20.04
@@ -21,28 +22,32 @@ jobs:
2122 defaults :
2223 run :
2324 shell : bash
25+ name : ${{ matrix.go }} on ${{ matrix.os }}
2426 steps :
2527
2628 - uses : actions/setup-go@v2
2729 with :
28- go-version : 1.x
30+ go-version : ${{ matrix.go }}
2931
3032 - id : go-cache-paths
3133 run : |
3234 echo "::set-output name=go-build::$(go env GOCACHE)"
3335 echo "::set-output name=go-mod::$(go env GOMODCACHE)"
36+ - run : echo ${{ steps.go-cache-paths.outputs.go-build }}
37+ - run : echo ${{ steps.go-cache-paths.outputs.go-mod }}
3438
3539 - name : Go Build Cache
3640 uses : actions/cache@v2
3741 with :
3842 path : ${{ steps.go-cache-paths.outputs.go-build }}
39- key : ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
43+ key : ${{ runner.os }}-go-${{ matrix.go }}- build-${{ hashFiles('**/go.sum') }}
4044
41- - name : Go Mod Cache
45+ - name : Go Mod Cache (go>=1.15)
4246 uses : actions/cache@v2
4347 with :
4448 path : ${{ steps.go-cache-paths.outputs.go-mod }}
45- key : ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
49+ key : ${{ runner.os }}-go-${{ matrix.go }}-mod-${{ hashFiles('**/go.sum') }}
50+ if : matrix.go != '1.14'
4651
4752
4853 - uses : actions/checkout@v2
6166
6267 - run : go test ./...
6368 - run : cd openapi3/testdata && go test -tags with_embed ./... && cd -
69+ if : matrix.go != '1.14'
6470 - if : runner.os == 'Linux'
6571 run : git --no-pager diff && [[ $(git --no-pager diff --name-only | wc -l) = 0 ]]
6672
You can’t perform that action at this time.
0 commit comments