1
0
Эх сурвалжийг харах

Include Go version to cache key in CI

DarthSim 2 жил өмнө
parent
commit
127015bf75

+ 2 - 2
.github/workflows/lint.yml

@@ -25,10 +25,10 @@ jobs:
       - name: Cache mods
         uses: actions/cache@v3
         with:
-          path:  |
+          path: |
             ~/.cache/go-build
             ~/go/pkg/mod
-          key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
+          key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
       - name: Download mods
         run: go mod download
       - name: Lint

+ 1 - 1
.github/workflows/test.yml

@@ -28,7 +28,7 @@ jobs:
           path: |
             ~/.cache/go-build
             ~/go/pkg/mod
-          key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
+          key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
       - name: Download mods
         run: go mod download
       - name: Test