Skip to content

Commit 348b3aa

Browse files
committed
macOS script
1 parent c0dc376 commit 348b3aa

File tree

3 files changed

+59
-2
lines changed

3 files changed

+59
-2
lines changed

.github/workflows/pull_request.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ jobs:
7878
NVM_DIR=/usr/local/nvm
7979
CI=1
8080
FAST_TEST_RUN=${{ contains(github.event.pull_request.labels.*.name, 'full-test-run') && '0' || '1'}}
81-
macos_pre_build_command: . .github/workflows/scripts/setup-linux.sh
82-
macos_build_command: ./scripts/test.sh
81+
macos_pre_build_command: . .github/workflows/scripts/setup-macos.sh
82+
macos_build_command: ./scripts/test_macos.sh
8383

8484
soundness:
8585
name: Soundness
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
##===----------------------------------------------------------------------===##
3+
##
4+
## This source file is part of the VS Code Swift open source project
5+
##
6+
## Copyright (c) 2025 the VS Code Swift project authors
7+
## Licensed under Apache License v2.0
8+
##
9+
## See LICENSE.txt for license information
10+
## See CONTRIBUTORS.txt for the list of VS Code Swift project authors
11+
##
12+
## SPDX-License-Identifier: Apache-2.0
13+
##
14+
##===----------------------------------------------------------------------===##
15+
16+
export NODE_VERSION=v20.19.0
17+
export NVM_DIR="$RUNNER_TEMP/.nvm"
18+
export NODE_PATH="$NVM_DIR/versions/node/v20.19.0/bin"
19+
20+
mkdir -p "$NVM_DIR"
21+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
22+
# shellcheck disable=SC1091
23+
. "$NVM_DIR/nvm.sh" && nvm install $NODE_VERSION
24+
echo "$NODE_PATH" >> "$GITHUB_PATH"
25+
26+
env | sort
27+
28+
if [ -n "$VSCODE_SWIFT_VSIX_ID" ]; then
29+
npm ci --ignore-scripts
30+
npx tsx scripts/download_vsix.ts
31+
fi

scripts/test_macos.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
##===----------------------------------------------------------------------===##
3+
##
4+
## This source file is part of the VS Code Swift open source project
5+
##
6+
## Copyright (c) 2025 the VS Code Swift project authors
7+
## Licensed under Apache License v2.0
8+
##
9+
## See LICENSE.txt for license information
10+
## See CONTRIBUTORS.txt for the list of VS Code Swift project authors
11+
##
12+
## SPDX-License-Identifier: Apache-2.0
13+
##
14+
##===----------------------------------------------------------------------===##
15+
16+
set -ex
17+
18+
export NODE_OPTIONS="--dns-result-order=ipv4first"
19+
export npm_config_https_proxy="$HTTPS_PROXY"
20+
21+
npm ci -ignore-script node-pty
22+
npm run lint
23+
npm run format
24+
npm run coverage
25+
26+
exit "$?"

0 commit comments

Comments
 (0)