File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments