Skip to content

Commit

Permalink
More cache
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaMahany committed Dec 13, 2024
1 parent 8b9acbf commit a62f6a2
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
- ubuntu-20.04
- macos-13
- windows-latest
outputs:
go-build-path: ${{ steps.go-cache-paths.outputs.go-build }}
go-mod-path: ${{ steps.go-cache-paths.outputs.go-mod }}
steps:
- name: Check out code
id: checkout
Expand Down Expand Up @@ -134,13 +137,27 @@ jobs:
check-latest: true
cache: false

- name: cache restore build output
- name: cache restore - build output
uses: actions/cache/restore@v4
with:
path: ./build
key: ${{ runner.os }}-${{ github.run_id }}
enableCrossOsArchive: true

- name: cache restore - go-build
uses: actions/cache/restore@v4
with:
path: ${{ needs.build.outputs.go-build-path }}
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
enableCrossOsArchive: true

- name: cache restore - go-mod
uses: actions/cache/restore@v4
with:
path: ${{ needs.build.outputs.go-mod-path }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
enableCrossOsArchive: true

- name: Test
run: make test

Expand Down

0 comments on commit a62f6a2

Please sign in to comment.