-
Notifications
You must be signed in to change notification settings - Fork 585
168 lines (146 loc) · 4.99 KB
/
mssql-vsix-launch.yml
File metadata and controls
168 lines (146 loc) · 4.99 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
name: MSSQL VSIX Launch Verification
on:
pull_request:
branches:
- main
- "release/**"
paths:
- ".github/workflows/mssql-vsix-launch.yml"
- ".github/actions/build-mssql/**"
- "extensions/mssql/**"
- "package.json"
- "package-lock.json"
- "scripts/**"
workflow_dispatch:
jobs:
package-mssql-vsixes:
name: Package MSSQL VSIX files
runs-on: ubuntu-latest
timeout-minutes: 90
permissions:
contents: read
steps:
- name: Checkout PR branch
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
cache: npm
cache-dependency-path: package-lock.json
- name: Install root dependencies
run: npm ci
- name: MSSQL - Install dependencies and build
uses: ./.github/actions/build-mssql
- name: MSSQL - Package offline VSIX files
run: npm run package -- --target mssql --offline
- name: MSSQL - Verify all platform VSIX files were packaged
run: |
set -euo pipefail
expected_platforms=(
"linux-arm64"
"linux-x64"
"osx"
"osx-arm64"
"win-arm64"
"win-x64"
)
for platform in "${expected_platforms[@]}"; do
matches="$(find ./extensions/mssql -maxdepth 1 -name "mssql-*-${platform}.vsix" -print | sort)"
match_count="$(printf '%s\n' "$matches" | sed '/^$/d' | wc -l | tr -d ' ')"
if [ "$match_count" -ne 1 ]; then
echo "Expected exactly one ${platform} VSIX, found ${match_count}."
printf '%s\n' "$matches"
exit 1
fi
done
find ./extensions/mssql -maxdepth 1 -name "*.vsix" -print | sort
- name: MSSQL - Upload VSIX files
uses: actions/upload-artifact@v6
with:
name: mssql-offline-vsix
path: ./extensions/mssql/*.vsix
verify-mssql-vsixes-launch:
name: Verify ${{ matrix.platform }} VSIX launch
needs: package-mssql-vsixes
runs-on: ${{ matrix.runner }}
timeout-minutes: 30
permissions:
contents: read
strategy:
fail-fast: false
matrix:
include:
- platform: linux-x64
runner: ubuntu-latest
- platform: linux-arm64
runner: ubuntu-24.04-arm
- platform: osx
runner: macos-15-intel
- platform: osx-arm64
runner: macos-15
- platform: win-x64
runner: windows-latest
- platform: win-arm64
runner: windows-11-arm
steps:
- name: Checkout PR branch
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
cache: npm
cache-dependency-path: extensions/mssql/package-lock.json
- name: MSSQL - Install test dependencies
working-directory: ./extensions/mssql
run: npm ci
- name: Download MSSQL VSIX files
uses: actions/download-artifact@v6
with:
name: mssql-offline-vsix
path: ./extensions/mssql
- name: MSSQL - Set up Linux display
if: runner.os == 'Linux'
shell: bash
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libkrb5-dev libxss1 dbus xvfb libgtk-3-0 libgbm1
sudo cp extensions/mssql/build/xvfb.init /etc/init.d/xvfb
sudo chmod +x /etc/init.d/xvfb
sudo update-rc.d xvfb defaults
sudo service xvfb start
- name: MSSQL - Verify platform VSIX launches
working-directory: ./extensions/mssql
shell: bash
env:
DISPLAY: ":10"
CI: "true"
VS_CODE_VERSION_NAME: stable
SKIP_DOTNET_RUNTIME_EXTENSION_INSTALL: "true"
DISABLE_ELECTRON_VIDEO_RECORDING: "true"
run: |
set -euo pipefail
matches="$(find . -maxdepth 1 -name "mssql-*-${{ matrix.platform }}.vsix" -print | sort)"
match_count="$(printf '%s\n' "$matches" | sed '/^$/d' | wc -l | tr -d ' ')"
if [ "$match_count" -ne 1 ]; then
echo "Expected exactly one ${{ matrix.platform }} VSIX, found ${match_count}."
printf '%s\n' "$matches"
exit 1
fi
export BUILT_VSIX_PATH="$(realpath "$matches")"
npx playwright test test/e2e/vsix.spec.ts
- name: MSSQL - Upload launch test artifacts
if: always()
uses: actions/upload-artifact@v6
with:
name: mssql-vsix-launch-test-artifacts-${{ matrix.platform }}
path: |
./extensions/mssql/test-results/**/
./extensions/mssql/test-reports/**/
retention-days: 7