mirror of
https://github.com/microsoft/vscode.git
synced 2026-02-15 07:28:05 +00:00
ci: fix electron download from test steps (#292811)
* ci: fix electron download from test steps * build: always repackage electron from oss entry scripts
This commit is contained in:
@@ -15,6 +15,8 @@ steps:
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
|
||||
- script: ./scripts/test.sh --build --tfs "Unit Tests"
|
||||
env:
|
||||
VSCODE_SKIP_PRELAUNCH: '1'
|
||||
displayName: 🧪 Run unit tests (Electron)
|
||||
timeoutInMinutes: 15
|
||||
- script: npm run test-node -- --build
|
||||
@@ -64,6 +66,7 @@ steps:
|
||||
./scripts/test-integration.sh --build --tfs "Integration Tests"
|
||||
env:
|
||||
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)
|
||||
VSCODE_SKIP_PRELAUNCH: '1'
|
||||
displayName: 🧪 Run integration tests (Electron)
|
||||
timeoutInMinutes: 20
|
||||
|
||||
@@ -85,6 +88,7 @@ steps:
|
||||
./scripts/test-remote-integration.sh
|
||||
env:
|
||||
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)
|
||||
VSCODE_SKIP_PRELAUNCH: '1'
|
||||
displayName: 🧪 Run integration tests (Remote)
|
||||
timeoutInMinutes: 20
|
||||
|
||||
|
||||
@@ -27,6 +27,8 @@ steps:
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
|
||||
- script: ./scripts/test.sh --build --tfs "Unit Tests"
|
||||
env:
|
||||
VSCODE_SKIP_PRELAUNCH: '1'
|
||||
displayName: 🧪 Run unit tests (Electron)
|
||||
timeoutInMinutes: 15
|
||||
- script: npm run test-node -- --build
|
||||
@@ -75,6 +77,7 @@ steps:
|
||||
./scripts/test-integration.sh --build --tfs "Integration Tests"
|
||||
env:
|
||||
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)
|
||||
VSCODE_SKIP_PRELAUNCH: '1'
|
||||
displayName: 🧪 Run integration tests (Electron)
|
||||
timeoutInMinutes: 20
|
||||
|
||||
@@ -95,6 +98,7 @@ steps:
|
||||
./scripts/test-remote-integration.sh
|
||||
env:
|
||||
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)
|
||||
VSCODE_SKIP_PRELAUNCH: '1'
|
||||
displayName: 🧪 Run integration tests (Remote)
|
||||
timeoutInMinutes: 20
|
||||
|
||||
|
||||
@@ -17,6 +17,8 @@ steps:
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
|
||||
- powershell: .\scripts\test.bat --build --tfs "Unit Tests"
|
||||
env:
|
||||
VSCODE_SKIP_PRELAUNCH: '1'
|
||||
displayName: 🧪 Run unit tests (Electron)
|
||||
timeoutInMinutes: 15
|
||||
- powershell: npm run test-node -- --build
|
||||
@@ -82,6 +84,8 @@ steps:
|
||||
$env:INTEGRATION_TEST_ELECTRON_PATH = "$AppRoot\$AppNameShort.exe"
|
||||
$env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\test\vscode-server-win32-$(VSCODE_ARCH)"
|
||||
exec { .\scripts\test-integration.bat --build --tfs "Integration Tests" }
|
||||
env:
|
||||
VSCODE_SKIP_PRELAUNCH: '1'
|
||||
displayName: 🧪 Run integration tests (Electron)
|
||||
timeoutInMinutes: 20
|
||||
|
||||
@@ -105,6 +109,8 @@ steps:
|
||||
$env:INTEGRATION_TEST_ELECTRON_PATH = "$AppRoot\$AppNameShort.exe"
|
||||
$env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\test\vscode-server-win32-$(VSCODE_ARCH)"
|
||||
exec { .\scripts\test-remote-integration.bat }
|
||||
env:
|
||||
VSCODE_SKIP_PRELAUNCH: '1'
|
||||
displayName: 🧪 Run integration tests (Remote)
|
||||
timeoutInMinutes: 20
|
||||
|
||||
|
||||
@@ -229,15 +229,9 @@ function getElectron(arch: string): () => NodeJS.ReadWriteStream {
|
||||
}
|
||||
|
||||
async function main(arch: string = process.arch): Promise<void> {
|
||||
const version = electronVersion;
|
||||
const electronPath = path.join(root, '.build', 'electron');
|
||||
const versionFile = path.join(electronPath, versionedResourcesFolder, 'version');
|
||||
const isUpToDate = fs.existsSync(versionFile) && fs.readFileSync(versionFile, 'utf8') === `${version}`;
|
||||
|
||||
if (!isUpToDate) {
|
||||
await util.rimraf(electronPath)();
|
||||
await util.streamToPromise(getElectron(arch)());
|
||||
}
|
||||
await util.rimraf(electronPath)();
|
||||
await util.streamToPromise(getElectron(arch)());
|
||||
}
|
||||
|
||||
if (import.meta.main) {
|
||||
|
||||
Reference in New Issue
Block a user