From 9e2d61e548a6edd163b05e31b69a8639417cdcac Mon Sep 17 00:00:00 2001 From: David Hadka Date: Fri, 19 Jun 2020 13:43:38 -0500 Subject: [PATCH] Delete cache folders prior to restore in tests (#486) * Delete cache folders prior to restore in tests * Update cache-tests.yml --- .github/workflows/cache-tests.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cache-tests.yml b/.github/workflows/cache-tests.yml index 10120ddc..1ac811ea 100644 --- a/.github/workflows/cache-tests.yml +++ b/.github/workflows/cache-tests.yml @@ -58,6 +58,12 @@ jobs: run: | node -e "Promise.resolve(require('./packages/cache/lib/cache').saveCache(['test-cache','~/test-cache'],'test-${{ runner.os }}-${{ github.run_id }}'))" + - name: Delete cache folders prior to restore + shell: bash + run: | + rm -rf test-cache + rm -rf ~/test-cache + - name: Restore cache using restoreCache() run: | node -e "Promise.resolve(require('./packages/cache/lib/cache').restoreCache(['test-cache','~/test-cache'],'test-${{ runner.os }}-${{ github.run_id }}'))" @@ -66,4 +72,4 @@ jobs: shell: bash run: | packages/cache/__tests__/verify-cache-files.sh ${{ runner.os }} test-cache - packages/cache/__tests__/verify-cache-files.sh ${{ runner.os }} ~/test-cache \ No newline at end of file + packages/cache/__tests__/verify-cache-files.sh ${{ runner.os }} ~/test-cache