Skip to content

Commit

Permalink
Try not to cache the test files if they were already cached
Browse files Browse the repository at this point in the history
  • Loading branch information
JesseTG committed Jan 23, 2025
1 parent 3c296ea commit dc578ef
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,29 @@ jobs:
path: "testfiles"
persist-credentials: false

- name: Check For Existing Cache
uses: actions/cache/restore@v4
id: check-existing-cache
with:
path: |
${{ github.workspace }}/testfiles
!${{ github.workspace }}/testfiles/.git
!${{ github.workspace }}/testfiles/*.7z
restore-keys: |
testfiles
key: "testfiles-${{ steps.clone-test-file-repo.outputs.commit }}"
enableCrossOsArchive: true
lookup-only: true

- name: Prepare Test Files
if: steps.check-existing-cache.outputs.cache-hit != 'true'
working-directory: "${{ github.workspace }}/testfiles"
shell: bash
run: 7z x "${{ secrets.DSI_NAND_ARCHIVE }}"

- name: Cache Test Files
uses: actions/cache/save@v4
if: steps.check-existing-cache.outputs.cache-hit != 'true'
with:
path: |
${{ github.workspace }}/testfiles
Expand Down

0 comments on commit dc578ef

Please sign in to comment.