Skip to content

Commit 4462231

Browse files
committed
[GHAction] Upgrade node to 22 and add retry/cache
I saw a GH action fail with the vscode exec download. This adds a retry as well as cache to help try and make CI more resilient.
1 parent f071eee commit 4462231

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

‎.github/workflows/main.yml‎

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
- name: Setup Node.js
100100
uses: actions/setup-node@v4
101101
with:
102-
node-version: '20'
102+
node-version: '22'
103103
cache: 'pnpm'
104104
cache-dependency-path: 'editors/code/pnpm-lock.yaml'
105105

@@ -195,7 +195,7 @@ jobs:
195195
- name: Setup Node.js
196196
uses: actions/setup-node@v4
197197
with:
198-
node-version: '20'
198+
node-version: '22'
199199
cache: 'pnpm'
200200
cache-dependency-path: 'editors/code/pnpm-lock.yaml'
201201

@@ -212,6 +212,12 @@ jobs:
212212
tar -xzf artifacts/log2src-${{ github.ref_name }}-macos-arm64/log2src-${{ github.ref_name }}-macos-arm64.tar.gz -C editors/code/bin/darwin-arm64
213213
unzip -o artifacts/log2src-${{ github.ref_name }}-windows-x64/log2src-${{ github.ref_name }}-windows-x64.zip -d editors/code/bin/win-x64
214214
215+
- name: Cache VS Code test runtime
216+
uses: actions/cache@v4
217+
with:
218+
path: editors/code/.vscode-test
219+
key: ${{ runner.os }}-vscode-test-${{ hashFiles('editors/code/pnpm-lock.yaml') }}
220+
215221
- name: Install Dependencies
216222
working-directory: editors/code
217223
run: pnpm install
@@ -221,7 +227,13 @@ jobs:
221227
if: runner.os == 'Linux'
222228
run: |
223229
sudo apt-get install -y xvfb
224-
pnpm run test:ci
230+
for attempt in 1 2 3; do
231+
pnpm run test:ci && exit 0
232+
if [ "$attempt" -eq 3 ]; then
233+
exit 1
234+
fi
235+
sleep $((attempt * 30))
236+
done
225237
226238
- name: Run Tests (Osx/Windows)
227239
working-directory: editors/code

0 commit comments

Comments
 (0)