Skip to content

Commit 649e0a3

Browse files
authored
Merge pull request #110 from numtide/correct-cache-logic-for-build-and-coverage
Correct caching logic for coverage CI
2 parents b18031f + 5804f15 commit 649e0a3

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/_reusable-test-coverage.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,9 @@ jobs:
6666
~/.cache/go-build
6767
~/go/pkg/mod
6868
bin
69-
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum', 'Makefile') }}
69+
key: ${{ runner.os }}-go-coverage-${{ hashFiles('**/go.sum', 'Makefile') }}
7070
restore-keys: |
71+
${{ runner.os }}-go-coverage-
7172
${{ runner.os }}-go-build-
7273
7374
- name: Build
@@ -246,11 +247,12 @@ jobs:
246247
- name: Save cache
247248
if: always() &&
248249
github.event_name != 'pull_request'
249-
uses: actions/cache/save@v3
250+
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
250251
with:
251-
key: ${{ steps.go-cache.outputs.cache-primary-key }}
252+
key: ${{ runner.os }}-go-coverage-${{ hashFiles('**/go.sum', 'Makefile') }}
252253
# Any location that we generate the test coverage report in
253254
path: |
254255
~/.cache/coverage.txt
255256
~/.cache/go-build
256-
~/go/pkg/mod
257+
~/go/pkg/mod
258+
bin

0 commit comments

Comments
 (0)