Skip to content

Commit 24602d2

Browse files
authored
chore: cache go dep (#87)
Updated GitHub Actions workflow to use newer action versions and added caching for Go build and module paths. <!--- Provide a general summary of your changes in the Title above --> ## Description <!--- Describe your changes in detail --> ## Related Issue Or Context <!--- If suggesting a new feature or change, please discuss it in an issue first --> <!--- If fixing a bug, there should be an issue describing it with steps to reproduce --> <!--- Otherwise, describe context and motivation for change herre --> Closes: #<issue> ## How Has This Been Tested? Testing details. <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation ## Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [ ] I have commented my code, particularly in hard-to-understand areas. - [ ] I have ensured that all acceptance criteria (or expected behavior) from issue are met - [ ] I have updated the documentation locally and in docs. - [ ] I have added tests to cover my changes. - [ ] I have ensured that all the checks are passing and green, I've signed the CLA bot
1 parent fdd1230 commit 24602d2

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/test.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,20 @@ jobs:
2424
runs-on: ubuntu-latest
2525
steps:
2626
- name: Install Go
27-
uses: actions/setup-go@v2
27+
uses: actions/setup-go@v6
2828
with:
2929
go-version: ${{ matrix.go-version }}
3030
- name: Checkout code
31-
uses: actions/checkout@v2
31+
uses: actions/checkout@v5
32+
- id: go-cache-paths
33+
run: |
34+
echo "GO_BUILD=$(go env GOCACHE)" >> "$GITHUB_OUTPUT"
35+
echo "GO_MOD=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"
3236
- uses: actions/cache@v4
3337
with:
34-
path: ~/go/pkg/mod
38+
path: |
39+
${{ steps.go-cache-paths.outputs.GO_BUILD }}
40+
${{ steps.go-cache-paths.outputs.GO_MOD }}
3541
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
3642
restore-keys: |
3743
${{ runner.os }}-go-

0 commit comments

Comments
 (0)