-
Notifications
You must be signed in to change notification settings - Fork 64
/
Copy pathtest_windows.ps1
35 lines (34 loc) · 1.12 KB
/
test_windows.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
##===----------------------------------------------------------------------===##
##
## This source file is part of the VS Code Swift open source project
##
## Copyright (c) 2025 the VS Code Swift project authors
## Licensed under Apache License v2.0
##
## See LICENSE.txt for license information
## See CONTRIBUTORS.txt for the list of VS Code Swift project authors
##
## SPDX-License-Identifier: Apache-2.0
##
##===----------------------------------------------------------------------===##
$env:CI = "1"
$env:FAST_TEST_RUN = "1"
npm ci -ignore-script node-pty
npm run lint
npm run format
npm run package
$User_Directory=".vscode-test\user-data\User"
New-Item $User_Directory -type directory -force
$Settings = @'
{
"swift.buildArguments": ["-Xswiftc", "-visualc-tools-version", "-Xswiftc", "14.42.34433", "-Xswiftc", "-windows-sdk-version", "-Xswiftc", "10.0.22000.0"]
}
'@
$Settings | Set-Content "$User_Directory\settings.json"
$Process = Start-Process npm "run integration-test" -Wait -PassThru -NoNewWindow
if ($Process.ExitCode -eq 0) {
Write-Host 'SUCCESS'
} else {
Write-Host ('FAILED ({0})' -f $Process.ExitCode)
exit 1
}