Skip to content

Commit d84b206

Browse files
Merge remote-tracking branch 'origin/main'
2 parents 3b1dffb + 69a1890 commit d84b206

28 files changed

+957
-333
lines changed

.github/workflows/pull_request.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Pull request
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, synchronize]
6+
7+
jobs:
8+
soundness:
9+
name: Soundness
10+
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
11+
with:
12+
# Pending https://github.com/swiftlang/vscode-swift/pull/1176
13+
license_header_check_enabled: false
14+
license_header_check_project_name: "VS Code Swift"
15+
api_breakage_check_enabled: false
16+
docs_check_enabled: false
17+
format_check_enabled: false
18+
shell_check_enabled: true
19+
unacceptable_language_check_enabled: true
20+
21+
tests:
22+
name: Test
23+
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
24+
with:
25+
linux_exclude_swift_versions: '[{"swift_version": "nightly-main"}]'
26+
linux_env_vars: |
27+
NODE_VERSION=v18.19.0
28+
NODE_PATH=/usr/local/nvm/versions/node/v18.19.0/bin
29+
NVM_DIR=/usr/local/nvm
30+
CI=1
31+
FAST_TEST_RUN=1
32+
linux_pre_build_command: |
33+
apt-get update && apt-get install -y rsync curl gpg libasound2 libgbm1 libgtk-3-0 libnss3 xvfb build-essential
34+
mkdir -p $NVM_DIR
35+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
36+
/bin/bash -c "source $NVM_DIR/nvm.sh && nvm install $NODE_VERSION"
37+
echo "$NODE_PATH" >> $GITHUB_PATH
38+
linux_build_command: ./docker/test.sh
39+
enable_windows_checks: false

assets/test/sleep.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
11
#!/bin/bash
2+
##===----------------------------------------------------------------------===##
3+
##
4+
## This source file is part of the VS Code Swift open source project
5+
##
6+
## Copyright (c) 2021 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+
216
sleep "$1"
317
exit "$2"

docker/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
#===----------------------------------------------------------------------===//
2+
#
3+
# This source file is part of the VS Code Swift open source project
4+
#
5+
# Copyright (c) 2024 the VS Code Swift project authors
6+
# Licensed under Apache License v2.0
7+
#
8+
# See LICENSE.txt for license information
9+
# See CONTRIBUTORS.txt for the list of VS Code Swift project authors
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
#
13+
#===----------------------------------------------------------------------===//
114
ARG swift_version=5.10
215
ARG ubuntu_version=jammy
316
ARG base_image=swift:$swift_version-$ubuntu_version

docker/test-ci.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
#!/bin/bash
2+
##===----------------------------------------------------------------------===##
3+
##
4+
## This source file is part of the VS Code Swift open source project
5+
##
6+
## Copyright (c) 2021 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+
##===----------------------------------------------------------------------===##
215

316
node << 'EOF'
417
const { execSync } = require('child_process');

docker/test.sh

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
#!/bin/bash
2+
##===----------------------------------------------------------------------===##
3+
##
4+
## This source file is part of the VS Code Swift open source project
5+
##
6+
## Copyright (c) 2021 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+
216
set -ex
317

418
current_directory=$(pwd)
@@ -18,6 +32,12 @@ npm ci
1832
npm run lint
1933
npm run format
2034
npm run package
35+
npm run test-soundness -- --force-run
36+
37+
xvfb-run -a npm run coverage 2>&1 | grep -Ev "Failed to connect to the bus|GPU stall due to ReadPixels"
38+
exit_code=${PIPESTATUS[0]}
39+
40+
rm -rf "${current_directory}/coverage"
41+
cp -R ./coverage "${current_directory}" || true
2142

22-
(xvfb-run -a npm run coverage; echo $? > exitcode) | grep -Ev "Failed to connect to the bus|GPU stall due to ReadPixels" && rm -rf "${current_directory}/coverage" && (cp -R ./coverage "${current_directory}" || true)
23-
exit "$(<exitcode)"
43+
exit "${exit_code}"

0 commit comments

Comments
 (0)