Skip to content
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

Test VS Code Version Matrix #886

Merged
merged 4 commits into from
Jan 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ jobs:

test:
strategy:
fail-fast: false
matrix:
vscode:
- '1.58.2'
- 'insiders'
- 'stable'
os:
- windows-latest
- macos-latest
Expand Down Expand Up @@ -119,3 +124,4 @@ jobs:
env:
CI: true
DISPLAY: ':99.0'
VSCODE_VERSION: ${{ matrix.vscode }}
24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,6 @@
"ts-jest": "^27.1.0",
"typescript": "^3.9.7",
"vsce": "^1.93.0",
"vscode-test": "^1.5.2"
"@vscode/test-electron": "^2.0.1"
}
}
15 changes: 4 additions & 11 deletions src/test/runTest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as path from 'path';
import { runTests } from 'vscode-test';
import { TestOptions } from 'vscode-test/out/runTest';
import { runTests } from '@vscode/test-electron';
import { TestOptions } from '@vscode/test-electron/out/runTest';
import { exec } from '../utils';

async function terraformInit() {
Expand Down Expand Up @@ -32,6 +32,7 @@ async function main(): Promise<void> {

// common options for all runners
const options: TestOptions = {
version: process.env['VSCODE_VERSION'] ?? 'stable',
extensionDevelopmentPath,
extensionTestsPath,
launchArgs: ['testFixture', '--disable-extensions', '--disable-workspace-trust'],
Expand All @@ -41,15 +42,7 @@ async function main(): Promise<void> {
// Download VS Code, unzip it and run the integration test
// start in the fixtures folder to prevent the language server from walking all the
// project root folders, like node_modules
console.log('_______________LATEST_____________________');
await runTests(options);

console.log('_______________INSIDERS___________________');
options.version = 'insiders';
await runTests(options);

console.log('________________1.55.0____________________');
options.version = '1.55.0';
console.log(`_______________${options.version}_____________________`);
await runTests(options);
} catch (err) {
console.error(err);
Expand Down