diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index de983d9..9a671fb 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -68,6 +68,24 @@ jobs: with: go-version-file: 'go.mod' + - name: Save Go cache paths + id: go-cache-paths + run: | + echo "::set-output name=go_mod_cache::$(go env GOMODCACHE)" + echo "::set-output name=go_cache::$(go env GOCACHE)" + + - name: Create Go module cache + uses: actions/cache@v3 + with: + path: ${{ steps.go-cache-paths.outputs.go_mod_cache }} + key: ${{ runner.os }}-go_mod_cache-${{ hashFiles('go.sum') }} + + - name: Create Go cache + uses: actions/cache@v3 + with: + path: ${{ steps.go-cache-paths.outputs.go_cache }} + key: ${{ runner.os }}-go_cache-${{ hashFiles('go.sum') }} + - name: Verify module dependencies run: go mod verify