Skip to content

Commit 687b379

Browse files
authored
fix: resolve CI e2e test ETIMEDOUT errors when downloading VS Code (RooCodeInc#7583)
1 parent 1e403a7 commit 687b379

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

.github/workflows/code-qa.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,38 @@ jobs:
8686
- name: Create .env.local file
8787
working-directory: apps/vscode-e2e
8888
run: echo "OPENROUTER_API_KEY=${{ secrets.OPENROUTER_API_KEY }}" > .env.local
89+
- name: Set VS Code test version
90+
run: echo "VSCODE_VERSION=1.101.2" >> $GITHUB_ENV
91+
- name: Cache VS Code test runtime
92+
uses: actions/cache@v4
93+
with:
94+
path: apps/vscode-e2e/.vscode-test
95+
key: ${{ runner.os }}-vscode-test-${{ env.VSCODE_VERSION }}
96+
- name: Pre-download VS Code test runtime with retry
97+
working-directory: apps/vscode-e2e
98+
run: |
99+
for attempt in 1 2 3; do
100+
echo "Download attempt $attempt of 3..."
101+
node -e "
102+
const { downloadAndUnzipVSCode } = require('@vscode/test-electron');
103+
downloadAndUnzipVSCode({ version: process.env.VSCODE_VERSION || '1.101.2' })
104+
.then(() => {
105+
console.log('✅ VS Code test runtime downloaded successfully');
106+
process.exit(0);
107+
})
108+
.catch(err => {
109+
console.error('❌ Failed to download VS Code (attempt $attempt):', err);
110+
process.exit(1);
111+
});
112+
" && break || {
113+
if [ $attempt -eq 3 ]; then
114+
echo "All download attempts failed"
115+
exit 1
116+
fi
117+
echo "Retrying in 5 seconds..."
118+
sleep 5
119+
}
120+
done
89121
- name: Run integration tests
90122
working-directory: apps/vscode-e2e
91123
run: xvfb-run -a pnpm test:ci

apps/vscode-e2e/src/runTest.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ async function main() {
3838
extensionTestsPath,
3939
launchArgs: [testWorkspace],
4040
extensionTestsEnv,
41+
version: process.env.VSCODE_VERSION || "1.101.2",
4142
})
4243

4344
// Clean up the temporary workspace

0 commit comments

Comments
 (0)