Explorar el Código

Include Go version to cache key in CI

DarthSim hace 2 años
padre
commit
127015bf75
Se han modificado 2 ficheros con 3 adiciones y 3 borrados
  1. 2 2
      .github/workflows/lint.yml
  2. 1 1
      .github/workflows/test.yml

+ 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