-
Notifications
You must be signed in to change notification settings - Fork 2.3k
fix: resolve CI e2e test ETIMEDOUT errors when downloading VS Code #7583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -86,6 +86,38 @@ jobs: | |
| - name: Create .env.local file | ||
| working-directory: apps/vscode-e2e | ||
| run: echo "OPENROUTER_API_KEY=${{ secrets.OPENROUTER_API_KEY }}" > .env.local | ||
| - name: Set VS Code test version | ||
| run: echo "VSCODE_VERSION=1.101.2" >> $GITHUB_ENV | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The VS Code version is specified both here as an environment variable and as a fallback in line 103. To ensure consistency and avoid potential mismatches, could we reference the environment variable directly in the Node script without the fallback? This would ensure a single source of truth. |
||
| - name: Cache VS Code test runtime | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: apps/vscode-e2e/.vscode-test | ||
| key: ${{ runner.os }}-vscode-test-${{ env.VSCODE_VERSION }} | ||
| - name: Pre-download VS Code test runtime with retry | ||
| working-directory: apps/vscode-e2e | ||
| run: | | ||
| for attempt in 1 2 3; do | ||
| echo "Download attempt $attempt of 3..." | ||
| node -e " | ||
| const { downloadAndUnzipVSCode } = require('@vscode/test-electron'); | ||
| downloadAndUnzipVSCode({ version: process.env.VSCODE_VERSION || '1.101.2' }) | ||
| .then(() => { | ||
| console.log('✅ VS Code test runtime downloaded successfully'); | ||
| process.exit(0); | ||
| }) | ||
| .catch(err => { | ||
| console.error('❌ Failed to download VS Code (attempt $attempt):', err); | ||
| process.exit(1); | ||
| }); | ||
| " && break || { | ||
| if [ $attempt -eq 3 ]; then | ||
| echo "All download attempts failed" | ||
| exit 1 | ||
| fi | ||
| echo "Retrying in 5 seconds..." | ||
| sleep 5 | ||
| } | ||
| done | ||
| - name: Run integration tests | ||
| working-directory: apps/vscode-e2e | ||
| run: xvfb-run -a pnpm test:ci | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a comment explaining why version 1.101.2 was chosen specifically. This would help future maintainers understand when and why to update it. For example: