Skip to content

Commit b4f6c00

Browse files
author
changfeng
committed
ci: simplify .vscode-test cache setting
1 parent 6d6ec87 commit b4f6c00

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,13 @@ jobs:
6060

6161
- name: Cache .vscode-test
6262
uses: actions/cache@v3
63+
env:
64+
# we use date as part of key because the vscode insiders updated daily
65+
CACHE_PREFIX: ${{ runner.os }}-vscode-test-${{ steps.date_unix.outputs.DATE || steps.date_windows.outputs.DATE }}
6366
with:
6467
path: .vscode-test
65-
key: ${{ runner.os }}-vscode-test-${{ hashFiles('test/runTests.ts') }}-${{ steps.date_unix.outputs.DATE || steps.date_windows.outputs.DATE }}
66-
restore-keys: ${{ runner.os }}-vscode-test-
68+
key: ${{ env.CACHE_PREFIX }}-${{ hashFiles('test/runTests.ts') }}
69+
restore-keys: ${{ env.CACHE_PREFIX }}
6770

6871
- run: xvfb-run -a pnpm test
6972
if: runner.os == 'Linux'

0 commit comments

Comments
 (0)