Skip to content

Commit

Permalink
add compression args to workflow cache test
Browse files Browse the repository at this point in the history
  • Loading branch information
planetmarshall committed Dec 6, 2024
1 parent 9c96e97 commit 7342dfb
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/cache-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
strategy:
matrix:
runs-on: [ubuntu-latest, windows-latest, macOS-latest]
compression: [auto, gzip, zstd, none]
fail-fast: false

runs-on: ${{ matrix.runs-on }}
Expand Down Expand Up @@ -55,8 +56,14 @@ jobs:

# We're using node -e to call the functions directly available in the @actions/cache package
- name: Save cache using saveCache()
run: |
node -e "Promise.resolve(require('./packages/cache/lib/cache').saveCache(['test-cache','~/test-cache'],'test-${{ runner.os }}-${{ github.run_id }}'))"
run: >
node -e "Promise.resolve(require('./packages/cache/lib/cache').saveCache(
['test-cache','~/test-cache'],
'test-${{ runner.os }}-${{ github.run_id }}',
undefined,
false,
'${{ matrix.compression }}'
))"
- name: Delete cache folders before restoring
shell: bash
Expand All @@ -65,8 +72,15 @@ jobs:
rm -rf ~/test-cache
- name: Restore cache using restoreCache() with http-client
run: |
node -e "Promise.resolve(require('./packages/cache/lib/cache').restoreCache(['test-cache','~/test-cache'],'test-${{ runner.os }}-${{ github.run_id }}',[],{useAzureSdk: false}))"
run: >
node -e "Promise.resolve(require('./packages/cache/lib/cache').restoreCache(
['test-cache','~/test-cache'],
'test-${{ runner.os }}-${{ github.run_id }}',
[],
{useAzureSdk: false},
false,
'${{ matrix.compression }}'
))"
- name: Verify cache restored with http-client
shell: bash
Expand Down

0 comments on commit 7342dfb

Please sign in to comment.