Skip to content

Commit

Permalink
Use relative paths for caching the test dependencies
Browse files Browse the repository at this point in the history
- Each platform has a different value of `github.workspace`, and that was causing cache misses
  • Loading branch information
JesseTG committed Jan 23, 2025
1 parent dc578ef commit 43ab269
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ jobs:
id: check-existing-cache
with:
path: |
${{ github.workspace }}/testfiles
!${{ github.workspace }}/testfiles/.git
!${{ github.workspace }}/testfiles/*.7z
testfiles
!testfiles/.git
!testfiles/*.7z
restore-keys: |
testfiles
key: "testfiles-${{ steps.clone-test-file-repo.outputs.commit }}"
Expand All @@ -61,9 +61,9 @@ jobs:
if: steps.check-existing-cache.outputs.cache-hit != 'true'
with:
path: |
${{ github.workspace }}/testfiles
!${{ github.workspace }}/testfiles/.git
!${{ github.workspace }}/testfiles/*.7z
testfiles
!testfiles/.git
!testfiles/*.7z
key: "testfiles-${{ steps.clone-test-file-repo.outputs.commit }}"
enableCrossOsArchive: true

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ jobs:
uses: actions/cache/restore@v4
with:
path: |
${{ github.workspace }}/testfiles
!${{ github.workspace }}/testfiles/.git
!${{ github.workspace }}/testfiles/*.7z
testfiles
!testfiles/.git
!testfiles/*.7z
restore-keys: |
testfiles
key: ${{ inputs.testfiles-cache-key }}
Expand Down

0 comments on commit 43ab269

Please sign in to comment.