Skip to content

Commit

Permalink
Merge pull request #139 from ulucinar/fix-gomod-cache
Browse files Browse the repository at this point in the history
Fix the path from/to which the Go mod cache is populated in e2e test runs
  • Loading branch information
ulucinar authored Oct 4, 2023
2 parents 06f24d4 + 15344e9 commit 0bfb3b2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/native-provider-bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ jobs:
with:
go-version: ${{ inputs.go-version }}

- name: Find the Go Build Cache
- name: Find Go Caches
id: go
run: echo "cache=$(make go.cachedir)" >> $GITHUB_OUTPUT
run: |
echo "cache=$(make go.cachedir)" >> $GITHUB_OUTPUT
echo "modcache=$(make go.mod.cachedir)" >> $GITHUB_OUTPUT
- name: Cache the Go Build Cache
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
Expand All @@ -45,7 +47,7 @@ jobs:
- name: Cache Go Dependencies
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
path: .work/pkg
path: ${{ steps.go.outputs.modcache }}
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-pkg-

Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/pr-comment-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,12 @@ jobs:
OUTPUT=$(git log -1 --format='%H')
echo "commit-sha=$OUTPUT" >> $GITHUB_OUTPUT
- name: Find the Go Build Cache
- name: Find Go Caches
if: ${{ inputs.package-type == 'provider' }}
id: go
run: echo "cache=$(make go.cachedir)" >> $GITHUB_OUTPUT
run: |
echo "cache=$(make go.cachedir)" >> $GITHUB_OUTPUT
echo "modcache=$(make go.mod.cachedir)" >> $GITHUB_OUTPUT
- name: Cache the Go Build Cache
if: ${{ inputs.package-type == 'provider' }}
Expand All @@ -139,11 +141,11 @@ jobs:
key: ${{ runner.os }}-build-uptest-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-build-uptest-

- name: Cache Go Dependencies
- name: Cache the Go Dependencies
if: ${{ inputs.package-type == 'provider' }}
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
path: .work/pkg
path: ${{ steps.go.outputs.modcache }}
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-pkg-

Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/provider-updoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ jobs:
with:
go-version: ${{ env.GO_VERSION }}

- name: Find the Go Build Cache
- name: Find Go Caches
id: go
run: echo "cache=$(make go.cachedir)" >> $GITHUB_OUTPUT
run: |
echo "cache=$(make go.cachedir)" >> $GITHUB_OUTPUT
echo "modcache=$(make go.mod.cachedir)" >> $GITHUB_OUTPUT
- name: Cache the Go Build Cache
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
Expand All @@ -44,7 +46,7 @@ jobs:
- name: Cache Go Dependencies
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
path: .work/pkg
path: ${{ steps.go.outputs.modcache }}
key: ${{ runner.os }}-updoc-pkg-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-updoc-pkg-

Expand Down

0 comments on commit 0bfb3b2

Please sign in to comment.