Skip to content

Commit 39497be

Browse files
author
Aasim Khan
committed
Merge remote-tracking branch 'origin/main' into aasim/fix/19545
2 parents a08d9e2 + 486de8f commit 39497be

File tree

1,267 files changed

+113282
-69500
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,267 files changed

+113282
-69500
lines changed

.github/ISSUE_TEMPLATE/1-mssql-bug-report.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,18 @@ body:
4747
description: Select all the areas where you encountered issues.
4848
options:
4949
- label: Connection dialog (SQL Server | Azure browse/Fabric browse)
50-
- label: Query results panel
5150
- label: Query editor
51+
- label: Query results panel
5252
- label: Object Explorer
53+
- label: GitHub Copilot integration
54+
- label: Preview/Edit data
5355
- label: Table Designer
54-
- label: Schema Compare
5556
- label: Schema Designer
57+
- label: Schema Compare
5658
- label: Local SQL Server Container provisioning
5759
- label: SQL database in Fabric provisioning
58-
- label: GitHub Copilot integration
60+
- label: DACPAC/BACPAC export/import
61+
- label: SQL Database projects
5962
- label: Query Plan Visualizer
6063
- label: Other (please describe below)
6164

.github/ISSUE_TEMPLATE/2-mssql-feature-request.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,18 @@ body:
4545
description: Select all areas this feature would enhance.
4646
options:
4747
- label: Connection dialog (SQL Server | Azure browse/Fabric browse)
48-
- label: Query results panel
4948
- label: Query editor
49+
- label: Query results panel
5050
- label: Object Explorer
51+
- label: GitHub Copilot integration
52+
- label: Preview/Edit data
5153
- label: Table Designer
52-
- label: Schema Compare
5354
- label: Schema Designer
55+
- label: Schema Compare
5456
- label: Local SQL Server Container provisioning
5557
- label: SQL database in Fabric provisioning
56-
- label: GitHub Copilot integration
58+
- label: DACPAC/BACPAC export/import
59+
- label: SQL Database projects
5760
- label: Query Plan Visualizer
5861
- label: Other (please describe below)
5962

.github/actions/build-extension/action.yml renamed to .github/actions/build-mssql/action.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
name: Build Extension.
2-
3-
description: Assumes extension is already checked out and cwd is the root of the extension.
1+
name: Build MSSQL Extension
2+
description: Builds the MSSQL VS Code extension.
43
runs:
54
using: "composite"
65
steps:
7-
- name: Set up xvfb
6+
- name: MSSQL - Set up xvfb
87
shell: bash
98
run: |
109
cd ${{ inputs.source-dir }}
@@ -15,27 +14,27 @@ runs:
1514
sudo update-rc.d xvfb defaults
1615
sudo service xvfb start
1716
18-
- name: Install tools
17+
- name: MSSQL - Install tools
1918
shell: bash
2019
run: |
2120
echo "Installing Yarn"
2221
npm install --global [email protected]
2322
echo "Installing VSCE"
2423
npm install --global [email protected]
2524
26-
- name: Install extension dependencies
25+
- name: MSSQL - Install extension dependencies
2726
shell: bash
2827
run: |
2928
cd ${{ inputs.source-dir }}
3029
yarn --frozen-lockfile
3130
32-
- name: Install playwright dependencies
31+
- name: MSSQL - Install playwright dependencies
3332
shell: bash
3433
run: |
3534
cd ${{ inputs.source-dir }}
3635
npx playwright install --with-deps
3736
38-
- name: Build extension
37+
- name: MSSQL - Build extension
3938
shell: bash
4039
run: |
4140
cd ${{ inputs.source-dir }}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build SQL Database Projects Extension
2+
description: Builds the SQL Database Projects VS Code extension.
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: SqlProj - Install tools
7+
shell: bash
8+
run: |
9+
echo "Installing Yarn"
10+
npm install --global [email protected]
11+
echo "Installing VSCE"
12+
npm install --global [email protected]
13+
14+
- name: SqlProj - Install extension dependencies
15+
shell: bash
16+
run: |
17+
cd ${{ inputs.source-dir }}
18+
yarn --frozen-lockfile
19+
20+
- name: SqlProj - Build extension
21+
shell: bash
22+
run: |
23+
cd ${{ inputs.source-dir }}
24+
yarn build
25+
26+
inputs:
27+
source-dir:
28+
description: "The source directory to build"
29+
required: false
30+
default: "."

.github/workflows/build-and-test.yml

Lines changed: 72 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515
branches:
1616
- main
1717
- "release/**"
18+
- dev/benjin/addSqlProj
1819
workflow_dispatch:
1920

2021
jobs:
@@ -67,37 +68,63 @@ jobs:
6768
echo "Installing VSCE"
6869
npm install --global [email protected]
6970
70-
- name: Install dependencies and build target extension
71-
uses: ./pr/.github/actions/build-extension
71+
- name: MSSQL - Install dependencies and build target branch
72+
uses: ./pr/.github/actions/build-mssql
7273
with:
73-
source-dir: "./target"
74+
source-dir: "./target/mssql"
7475

75-
- name: Install dependencies and build PR extension
76-
uses: ./pr/.github/actions/build-extension
76+
- name: SqlProj - Install dependencies and build target branch
77+
uses: ./pr/.github/actions/build-sqlproj
7778
with:
78-
source-dir: "./pr"
79+
source-dir: "./target/sql-database-projects"
7980

80-
- name: Run lint
81+
- name: MSSQL - Install dependencies and build PR branch
82+
uses: ./pr/.github/actions/build-mssql
83+
with:
84+
source-dir: "./pr/mssql"
85+
86+
- name: SqlProj - Install dependencies and build PR branch
87+
uses: ./pr/.github/actions/build-sqlproj
88+
with:
89+
source-dir: "./pr/sql-database-projects"
90+
91+
- name: MSSQL - Run lint
92+
run: |
93+
cd ./pr/mssql
94+
yarn lint src/ test/
95+
96+
- name: SqlProj - Run lint
97+
continue-on-error: true
8198
run: |
82-
cd ./pr
83-
yarn lint
99+
cd ./pr/sql-database-projects
100+
yarn lint src/ test/
84101
85102
# Calculate sizes and package before testing;
86103
# Testing generates sourcemaps and instrumented code
87104
# that increase size
88-
- name: Package both branches
105+
- name: MSSQL - Package both branches
89106
continue-on-error: true
90107
run: |
91-
cd target
92-
vsce package
93-
cd ../pr
94-
vsce package
108+
(cd target/mssql && vsce package)
109+
(cd pr/mssql && vsce package)
110+
111+
- name: SqlProj - Package both branches
112+
continue-on-error: true
113+
run: |
114+
(cd target/sql-database-projects && vsce package)
115+
(cd pr/sql-database-projects && vsce package)
116+
117+
- name: MSSQL - Upload PR VSIX files
118+
uses: actions/upload-artifact@v4
119+
with:
120+
name: mssql-vsix
121+
path: ./pr/mssql/*.vsix
95122

96-
- name: Upload PR VSIX files
123+
- name: SqlProj - Upload PR VSIX files
97124
uses: actions/upload-artifact@v4
98125
with:
99-
name: vsix-files
100-
path: ./pr/*.vsix
126+
name: sql-database-projects-vsix
127+
path: ./pr/sql-database-projects/*.vsix
101128

102129
- name: Setting up change icons
103130
run: |
@@ -107,8 +134,8 @@ jobs:
107134
108135
- name: Calculate webview bundle sizes
109136
run: |
110-
target_file=$(du -sk ./target/dist/views | cut -f1)
111-
pr_file=$(du -sk ./pr/dist/views | cut -f1)
137+
target_file=$(du -sk ./target/mssql/dist/views | cut -f1)
138+
pr_file=$(du -sk ./pr/mssql/dist/views | cut -f1)
112139
echo "Target branch bundle size: $target_file KB"
113140
echo "PR branch bundle size: $pr_file KB"
114141
size_diff=$((pr_file - target_file))
@@ -129,8 +156,8 @@ jobs:
129156
130157
- name: Calculate vsix file sizes
131158
run: |
132-
target_vsix=$(find ./target -name "*.vsix")
133-
pr_vsix=$(find ./pr -name "*.vsix")
159+
target_vsix=$(find ./target/mssql -name "*.vsix")
160+
pr_vsix=$(find ./pr/mssql -name "*.vsix")
134161
target_size=$(stat -c%s "$target_vsix")
135162
pr_size=$(stat -c%s "$pr_vsix")
136163
target_size=$((target_size / 1024))
@@ -157,7 +184,7 @@ jobs:
157184
continue-on-error: true
158185
run: |
159186
set +e # Don't exit on errors
160-
cd pr
187+
cd pr/mssql
161188
DISPLAY=:10 yarn test
162189
UNIT_EXIT_CODE=$?
163190
echo "unit_tests_pr_exit_code=$UNIT_EXIT_CODE" >> $GITHUB_ENV
@@ -169,23 +196,21 @@ jobs:
169196
name: "Unit Test Report"
170197
path: ./test-reports/**/*.xml
171198
reporter: jest-junit
172-
working-directory: ./pr
199+
working-directory: ./pr/mssql
173200
badge-title: "unit-tests"
174201
fail-on-error: false
175202

176203
- name: Run unit tests for target branch # for calculating coverage comparison
177204
continue-on-error: true
178205
run: |
179-
cd target
206+
cd target/mssql
180207
DISPLAY=:10 yarn test
181208
182209
- name: Build mappings for Webviews
183210
continue-on-error: true
184211
run: |
185-
cd ./pr
186-
yarn build:webviews-bundle
187-
cd ../target
188-
yarn build:webviews-bundle
212+
(cd ./pr/mssql && yarn build:webviews-bundle)
213+
(cd ./target/mssql && yarn build:webviews-bundle)
189214
190215
- name: Setup environment for smoke tests
191216
run: |
@@ -209,7 +234,7 @@ jobs:
209234
sudo apt-get update
210235
sudo apt-get install -y mssql-tools
211236
/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P "$PASSWORD" -Q "SELECT @@VERSION"
212-
working-directory: ./pr
237+
working-directory: ./pr/mssql
213238

214239
- name: Run smoke tests for PR branch
215240
continue-on-error: true
@@ -222,7 +247,7 @@ jobs:
222247
export PASSWORD=${{ env.PASSWORD }}
223248
export SAVE_PASSWORD=No
224249
export PROFILE_NAME=test-server
225-
cd pr
250+
cd pr/mssql
226251
export BUILT_VSIX_PATH=$(find ./ -name "*.vsix" -exec realpath {} \; | head -n 1)
227252
DISPLAY=:10 yarn smoketest
228253
SMOKE_EXIT_CODE=$?
@@ -232,7 +257,7 @@ jobs:
232257
uses: actions/upload-artifact@v4
233258
with:
234259
name: smoke-test-failure-screenshots
235-
path: ./pr/test-results/**/
260+
path: ./pr/mssql/test-results/**/
236261
retention-days: 7
237262

238263
- name: PR Smoke Test Report
@@ -242,7 +267,7 @@ jobs:
242267
name: "Smoke Test Report"
243268
path: ./test-reports/**/smoke-results.xml
244269
reporter: jest-junit
245-
working-directory: ./pr
270+
working-directory: ./pr/mssql
246271
badge-title: "smoke-tests"
247272
fail-on-error: false
248273

@@ -256,28 +281,28 @@ jobs:
256281
export PASSWORD=${{ env.PASSWORD }}
257282
export SAVE_PASSWORD=No
258283
export PROFILE_NAME=test-server
259-
cd target
284+
cd target/mssql
260285
export BUILT_VSIX_PATH=$(find ./ -name "*.vsix" | head -n 1)
261286
DISPLAY=:10 yarn smoketest
262287
263288
- name: Merge Smoke and Unit Test Coverage Reports
264289
run: |
265-
if [ -f target/test/resources/mergeReports.js ]; then
266-
node target/test/resources/mergeReports.js target/coverage/coverage-e2e/cobertura-coverage.xml target/coverage/cobertura-coverage.xml
290+
if [ -f target/mssql/test/resources/mergeReports.js ]; then
291+
node target/mssql/test/resources/mergeReports.js target/mssql/coverage/coverage-e2e/cobertura-coverage.xml target/mssql/coverage/cobertura-coverage.xml
267292
else
268-
echo "mergeReports.js not found in ./target, skipping..."
293+
echo "mergeReports.js not found in ./target/mssql, skipping..."
269294
fi
270295
271-
if [ -f pr/test/resources/mergeReports.js ]; then
272-
node pr/test/resources/mergeReports.js pr/coverage/coverage-e2e/cobertura-coverage.xml pr/coverage/cobertura-coverage.xml
296+
if [ -f pr/mssql/test/resources/mergeReports.js ]; then
297+
node pr/mssql/test/resources/mergeReports.js pr/mssql/coverage/coverage-e2e/cobertura-coverage.xml pr/mssql/coverage/cobertura-coverage.xml
273298
else
274-
echo "mergeReports.js not found in ./pr, skipping..."
299+
echo "mergeReports.js not found in ./pr/mssql, skipping..."
275300
fi
276301
277302
- name: Generate Coverage Report
278303
uses: danielpalme/[email protected]
279304
with:
280-
reports: "./pr/coverage/cobertura-coverage.xml"
305+
reports: "./pr/mssql/coverage/cobertura-coverage.xml"
281306
targetdir: "coveragereport"
282307
reporttypes: "Html"
283308
toolpath: "reportgeneratortool"
@@ -292,19 +317,19 @@ jobs:
292317
uses: codecov/codecov-action@v5
293318
with:
294319
token: ${{ secrets.CODECOV_TOKEN }}
295-
directory: "./pr/coverage"
320+
directory: "./pr/mssql/coverage"
296321
exclude: "coverage-e2e" # coverage for smoke tests is already merged above
297322

298323
- name: Code coverage
299324
run: |
300-
cd target
325+
cd target/mssql
301326
xml_coverage_target="./coverage/cobertura-coverage.xml"
302327
# Pull out the line rate coverage from the target branch's cobertura report
303328
line_rate_target=$(grep -m 1 -o 'line-rate="[0-9.]\+"' "$xml_coverage_target" | sed 's/line-rate="\([0-9.]*\)"/\1/')
304329
line_rate_target=$(printf "%.2f" $(echo "$line_rate_target * 100" | bc))
305330
# Save formatted line rate in env variable
306331
echo "line_rate_target=$line_rate_target" >> $GITHUB_ENV
307-
cd ../pr
332+
cd ../../pr/mssql
308333
xml_coverage_pr="./coverage/cobertura-coverage.xml"
309334
# Pull out the line rate coverage from the pr branch's cobertura report
310335
line_rate_pr=$(grep -m 1 -o 'line-rate="[0-9.]\+"' "$xml_coverage_pr" | sed 's/line-rate="\([0-9.]*\)"/\1/')
@@ -353,15 +378,15 @@ jobs:
353378
comment-id: ${{ steps.fc.outputs.comment-id }}
354379
edit-mode: replace
355380

356-
- name: Generate xliff files in PR branch
381+
- name: MSSQL - Generate xliff files in PR branch
357382
run: |
358-
cd pr
383+
cd pr/mssql
359384
yarn localization
360385
361386
# Check if there are git changes in english xlf files
362-
- name: Check for changes in english xlf files
387+
- name: MSSQL - Check for changes in english xlf files
363388
run: |
364-
cd pr
389+
cd pr/mssql
365390
if git diff --quiet --exit-code ./localization/xliff/vscode-mssql.xlf; then
366391
echo "Changes not found in english xlf files"
367392
echo "loc_update_required=false" >> $GITHUB_ENV

0 commit comments

Comments
 (0)