From a62f6a2e9723f35cdcc50001e6dea0f200d0d28e Mon Sep 17 00:00:00 2001 From: RebeccaMahany Date: Fri, 13 Dec 2024 12:57:49 -0500 Subject: [PATCH] More cache --- .github/workflows/go.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 93645540e..9f9d26985 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -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 @@ -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