Skip to content

Commit 7938b26

Browse files
authored
FEAT: Expand CI Testing to add new SQL Server Versions (#308)
### Work Item / Issue Reference <!-- IMPORTANT: Please follow the PR template guidelines below. For mssql-python maintainers: Insert your ADO Work Item ID below (e.g. AB#37452) For external contributors: Insert Github Issue number below (e.g. #149) Only one reference is required - either GitHub issue OR ADO Work Item. --> <!-- mssql-python maintainers: ADO Work Item --> > [AB#39997](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/39997) ------------------------------------------------------------------- ### Summary <!-- Insert your summary of changes below. Minimum 10 characters required. --> This pull request updates the `pr-validation-pipeline.yml` to enhance test coverage and CI flexibility by adding matrix builds for multiple SQL Server environments (LocalDB, SQL Server 2022, and Azure SQL Database) on Windows, and by introducing support for SQL Server 2025 on Linux via Docker. The changes ensure that tests are run and results are published for each supported SQL backend, improving reliability and compatibility testing. **Windows build matrix and test orchestration:** * Added a build matrix to run jobs against both `LocalDB` and `SQL Server 2022` on Windows, allowing the pipeline to test against multiple SQL Server versions in parallel. * Added conditional steps to install and configure either LocalDB or SQL Server 2022 Express, including database and user setup scripts tailored for each environment. * Updated test execution to run pytest separately for each SQL backend (LocalDB, SQL Server 2022, and optionally Azure SQL Database), with unique result and coverage file names for each run. * Modified test result publishing to aggregate results from all matrix jobs, improving clarity in CI reporting. **Linux build matrix and SQL Server version support:** * Extended the Linux build matrix to include SQL Server 2025 (via Docker), and parameterized the SQL Server image used in each job, enabling future SQL Server version testing with minimal changes. [[1]](diffhunk://#diff-296c8f902bbd70f34ee1c8c32383c8c99165fe4c8e5b0f234f8f22246e56a621R305-R313) [[2]](diffhunk://#diff-296c8f902bbd70f34ee1c8c32383c8c99165fe4c8e5b0f234f8f22246e56a621L233-R332) <!-- ### PR Title Guide > For feature requests FEAT: (short-description) > For non-feature requests like test case updates, config updates , dependency updates etc CHORE: (short-description) > For Fix requests FIX: (short-description) > For doc update requests DOC: (short-description) > For Formatting, indentation, or styling update STYLE: (short-description) > For Refactor, without any feature changes REFACTOR: (short-description) > For release related changes, without any feature changes RELEASE: #<RELEASE_VERSION> (short-description) ### Contribution Guidelines External contributors: - Create a GitHub issue first: https://github.com/microsoft/mssql-python/issues/new - Link the GitHub issue in the "GitHub Issue" section above - Follow the PR title format and provide a meaningful summary mssql-python maintainers: - Create an ADO Work Item following internal processes - Link the ADO Work Item in the "ADO Work Item" section above - Follow the PR title format and provide a meaningful summary -->
1 parent 695719d commit 7938b26

File tree

4 files changed

+263
-149
lines changed

4 files changed

+263
-149
lines changed

eng/pipelines/pr-validation-pipeline.yml

Lines changed: 173 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -50,32 +50,112 @@ jobs:
5050
pool:
5151
vmImage: 'windows-latest'
5252

53+
strategy:
54+
matrix:
55+
LocalDB:
56+
sqlVersion: 'LocalDB'
57+
pythonVersion: '3.13'
58+
SQLServer2022:
59+
sqlVersion: 'SQL2022'
60+
pythonVersion: '3.13'
61+
LocalDB_Python314:
62+
sqlVersion: 'LocalDB'
63+
pythonVersion: '3.14'
64+
5365
steps:
5466
- task: UsePythonVersion@0
5567
inputs:
56-
versionSpec: '3.13'
68+
versionSpec: '$(pythonVersion)'
5769
addToPath: true
5870
githubToken: $(GITHUB_TOKEN)
59-
displayName: 'Use Python 3.13'
71+
displayName: 'Use Python $(pythonVersion)'
6072

6173
- script: |
6274
python -m pip install --upgrade pip
6375
pip install -r requirements.txt
6476
displayName: 'Install dependencies'
6577
66-
# Start LocalDB instance
78+
# Start LocalDB instance (for LocalDB matrix)
6779
- powershell: |
6880
sqllocaldb create MSSQLLocalDB
6981
sqllocaldb start MSSQLLocalDB
7082
displayName: 'Start LocalDB instance'
83+
condition: eq(variables['sqlVersion'], 'LocalDB')
7184
72-
# Create database and user
85+
# Create database and user for LocalDB
7386
- powershell: |
7487
sqlcmd -S "(localdb)\MSSQLLocalDB" -Q "CREATE DATABASE TestDB"
7588
sqlcmd -S "(localdb)\MSSQLLocalDB" -Q "CREATE LOGIN testuser WITH PASSWORD = '$(DB_PASSWORD)'"
7689
sqlcmd -S "(localdb)\MSSQLLocalDB" -d TestDB -Q "CREATE USER testuser FOR LOGIN testuser"
7790
sqlcmd -S "(localdb)\MSSQLLocalDB" -d TestDB -Q "ALTER ROLE db_owner ADD MEMBER testuser"
78-
displayName: 'Setup database and user'
91+
displayName: 'Setup database and user for LocalDB'
92+
condition: eq(variables['sqlVersion'], 'LocalDB')
93+
env:
94+
DB_PASSWORD: $(DB_PASSWORD)
95+
96+
# Install SQL Server 2022 (for SQL2022 matrix)
97+
- powershell: |
98+
Write-Host "Downloading SQL Server 2022 Express..."
99+
# Download SQL Server 2022 Express installer
100+
$ProgressPreference = 'SilentlyContinue'
101+
Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/p/?linkid=2216019" -OutFile "SQL2022-SSEI-Expr.exe"
102+
103+
Write-Host "Installing SQL Server 2022 Express..."
104+
# Install SQL Server 2022 Express with basic features
105+
Start-Process -FilePath "SQL2022-SSEI-Expr.exe" -ArgumentList "/Action=Download","/MediaPath=$env:TEMP","/MediaType=Core","/Quiet" -Wait
106+
107+
# Find the downloaded setup file
108+
$setupFile = Get-ChildItem -Path $env:TEMP -Filter "SQLEXPR_x64_ENU.exe" -Recurse | Select-Object -First 1
109+
110+
if ($setupFile) {
111+
Write-Host "Extracting SQL Server setup files..."
112+
Start-Process -FilePath $setupFile.FullName -ArgumentList "/x:$env:TEMP\SQLSetup","/u" -Wait
113+
114+
Write-Host "Running SQL Server setup..."
115+
Start-Process -FilePath "$env:TEMP\SQLSetup\setup.exe" -ArgumentList "/Q","/ACTION=Install","/FEATURES=SQLEngine","/INSTANCENAME=MSSQLSERVER","/SQLSVCACCOUNT=`"NT AUTHORITY\SYSTEM`"","/SQLSYSADMINACCOUNTS=`"BUILTIN\Administrators`"","/TCPENABLED=1","/SECURITYMODE=SQL","/SAPWD=$(DB_PASSWORD)","/IACCEPTSQLSERVERLICENSETERMS" -Wait
116+
} else {
117+
Write-Error "Failed to download SQL Server setup file"
118+
exit 1
119+
}
120+
121+
Write-Host "SQL Server 2022 installation completed"
122+
displayName: 'Install SQL Server 2022 Express'
123+
condition: eq(variables['sqlVersion'], 'SQL2022')
124+
env:
125+
DB_PASSWORD: $(DB_PASSWORD)
126+
127+
# Create database for SQL Server 2022
128+
- powershell: |
129+
# Wait for SQL Server to start
130+
$maxAttempts = 30
131+
$attempt = 0
132+
$connected = $false
133+
134+
Write-Host "Waiting for SQL Server 2022 to start..."
135+
while (-not $connected -and $attempt -lt $maxAttempts) {
136+
try {
137+
sqlcmd -S "localhost" -U "sa" -P "$(DB_PASSWORD)" -Q "SELECT 1" -C
138+
$connected = $true
139+
Write-Host "SQL Server is ready!"
140+
} catch {
141+
$attempt++
142+
Write-Host "Waiting... ($attempt/$maxAttempts)"
143+
Start-Sleep -Seconds 2
144+
}
145+
}
146+
147+
if (-not $connected) {
148+
Write-Error "Failed to connect to SQL Server after $maxAttempts attempts"
149+
exit 1
150+
}
151+
152+
# Create database and user
153+
sqlcmd -S "localhost" -U "sa" -P "$(DB_PASSWORD)" -Q "CREATE DATABASE TestDB" -C
154+
sqlcmd -S "localhost" -U "sa" -P "$(DB_PASSWORD)" -Q "CREATE LOGIN testuser WITH PASSWORD = '$(DB_PASSWORD)'" -C
155+
sqlcmd -S "localhost" -U "sa" -P "$(DB_PASSWORD)" -d TestDB -Q "CREATE USER testuser FOR LOGIN testuser" -C
156+
sqlcmd -S "localhost" -U "sa" -P "$(DB_PASSWORD)" -d TestDB -Q "ALTER ROLE db_owner ADD MEMBER testuser" -C
157+
displayName: 'Setup database and user for SQL Server 2022'
158+
condition: eq(variables['sqlVersion'], 'SQL2022')
79159
env:
80160
DB_PASSWORD: $(DB_PASSWORD)
81161
@@ -84,31 +164,48 @@ jobs:
84164
build.bat x64
85165
displayName: 'Build .pyd file'
86166
167+
# Run tests for LocalDB
87168
- script: |
88-
python -m pytest -v --junitxml=test-results.xml --cov=. --cov-report=xml --capture=tee-sys --cache-clear
89-
displayName: 'Run tests with coverage'
169+
python -m pytest -v --junitxml=test-results-localdb.xml --cov=. --cov-report=xml:coverage-localdb.xml --capture=tee-sys --cache-clear
170+
displayName: 'Run tests with coverage on LocalDB'
171+
condition: eq(variables['sqlVersion'], 'LocalDB')
90172
env:
91173
DB_CONNECTION_STRING: 'Server=(localdb)\MSSQLLocalDB;Database=TestDB;Uid=testuser;Pwd=$(DB_PASSWORD);TrustServerCertificate=yes'
92174
93-
- task: PublishBuildArtifacts@1
175+
# Run tests for SQL Server 2022
176+
- script: |
177+
python -m pytest -v --junitxml=test-results-sql2022.xml --cov=. --cov-report=xml:coverage-sql2022.xml --capture=tee-sys --cache-clear
178+
displayName: 'Run tests with coverage on SQL Server 2022'
179+
condition: eq(variables['sqlVersion'], 'SQL2022')
180+
env:
181+
DB_CONNECTION_STRING: 'Server=localhost;Database=TestDB;Uid=testuser;Pwd=$(DB_PASSWORD);TrustServerCertificate=yes'
182+
183+
- task: CopyFiles@2
94184
inputs:
95-
PathtoPublish: 'mssql_python/ddbc_bindings.cp313-amd64.pyd'
96-
ArtifactName: 'ddbc_bindings'
97-
publishLocation: 'Container'
98-
displayName: 'Publish pyd file as artifact'
185+
SourceFolder: 'mssql_python'
186+
Contents: 'ddbc_bindings.cp*-amd64.pyd'
187+
TargetFolder: '$(Build.ArtifactStagingDirectory)'
188+
displayName: 'Copy pyd file to staging'
189+
190+
- task: CopyFiles@2
191+
inputs:
192+
SourceFolder: 'mssql_python'
193+
Contents: 'ddbc_bindings.cp*-amd64.pdb'
194+
TargetFolder: '$(Build.ArtifactStagingDirectory)'
195+
displayName: 'Copy pdb file to staging'
99196

100197
- task: PublishBuildArtifacts@1
101198
inputs:
102-
PathtoPublish: 'mssql_python/ddbc_bindings.cp313-amd64.pdb'
199+
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
103200
ArtifactName: 'ddbc_bindings'
104201
publishLocation: 'Container'
105-
displayName: 'Publish pdb file as artifact'
202+
displayName: 'Publish build artifacts'
106203

107204
- task: PublishTestResults@2
108205
condition: succeededOrFailed()
109206
inputs:
110-
testResultsFiles: '**/test-results.xml'
111-
testRunTitle: 'Publish test results'
207+
testResultsFiles: '**/test-results-*.xml'
208+
testRunTitle: 'Publish test results for Windows $(sqlVersion)'
112209

113210
# - task: PublishCodeCoverageResults@1
114211
# inputs:
@@ -190,7 +287,7 @@ jobs:
190287
python -m pytest -v --junitxml=test-results.xml --cov=. --cov-report=xml --capture=tee-sys --cache-clear
191288
displayName: 'Run pytest with coverage'
192289
env:
193-
DB_CONNECTION_STRING: 'Driver=ODBC Driver 18 for SQL Server;Server=tcp:127.0.0.1,1433;Database=master;Uid=SA;Pwd=$(DB_PASSWORD);TrustServerCertificate=yes'
290+
DB_CONNECTION_STRING: 'Server=tcp:127.0.0.1,1433;Database=master;Uid=SA;Pwd=$(DB_PASSWORD);TrustServerCertificate=yes'
194291
DB_PASSWORD: $(DB_PASSWORD)
195292
196293
- task: PublishTestResults@2
@@ -209,9 +306,23 @@ jobs:
209306
Ubuntu:
210307
dockerImage: 'ubuntu:22.04'
211308
distroName: 'Ubuntu'
309+
sqlServerImage: 'mcr.microsoft.com/mssql/server:2022-latest'
310+
useAzureSQL: 'false'
311+
Ubuntu_SQL2025:
312+
dockerImage: 'ubuntu:22.04'
313+
distroName: 'Ubuntu-SQL2025'
314+
sqlServerImage: 'mcr.microsoft.com/mssql/server:2025-latest'
315+
useAzureSQL: 'false'
316+
Ubuntu_AzureSQL:
317+
dockerImage: 'ubuntu:22.04'
318+
distroName: 'Ubuntu-AzureSQL'
319+
sqlServerImage: ''
320+
useAzureSQL: 'true'
212321
Debian:
213322
dockerImage: 'debian:12'
214323
distroName: 'Debian'
324+
sqlServerImage: 'mcr.microsoft.com/mssql/server:2022-latest'
325+
useAzureSQL: 'false'
215326

216327
steps:
217328
- script: |
@@ -230,7 +341,7 @@ jobs:
230341
-e ACCEPT_EULA=Y \
231342
-e MSSQL_SA_PASSWORD="$(DB_PASSWORD)" \
232343
-p 1433:1433 \
233-
mcr.microsoft.com/mssql/server:2022-latest
344+
$(sqlServerImage)
234345
235346
# Wait for SQL Server to be ready
236347
echo "Waiting for SQL Server to start..."
@@ -256,6 +367,7 @@ jobs:
256367
-P "$(DB_PASSWORD)" \
257368
-C -Q "CREATE DATABASE TestDB"
258369
displayName: 'Start SQL Server container for $(distroName)'
370+
condition: eq(variables['useAzureSQL'], 'false')
259371
env:
260372
DB_PASSWORD: $(DB_PASSWORD)
261373
@@ -354,20 +466,35 @@ jobs:
354466
355467
- script: |
356468
# Run tests in the container
357-
# Get SQL Server container IP
358-
SQLSERVER_IP=$(docker inspect sqlserver-$(distroName) --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}')
359-
echo "SQL Server IP: $SQLSERVER_IP"
360-
361-
docker exec \
362-
-e DB_CONNECTION_STRING="Driver=ODBC Driver 18 for SQL Server;Server=$SQLSERVER_IP;Database=TestDB;Uid=SA;Pwd=$(DB_PASSWORD);TrustServerCertificate=yes" \
363-
-e DB_PASSWORD="$(DB_PASSWORD)" \
364-
test-container-$(distroName) bash -c "
365-
source /opt/venv/bin/activate
366-
echo 'Build successful, running tests now on $(distroName)'
367-
echo 'Using connection string: Driver=ODBC Driver 18 for SQL Server;Server=$SQLSERVER_IP;Database=TestDB;Uid=SA;Pwd=***;TrustServerCertificate=yes'
368-
python -m pytest -v --junitxml=test-results-$(distroName).xml --cov=. --cov-report=xml:coverage-$(distroName).xml --capture=tee-sys --cache-clear
369-
"
469+
if [ "$(useAzureSQL)" = "true" ]; then
470+
# Azure SQL Database testing
471+
echo "Testing against Azure SQL Database"
472+
473+
docker exec \
474+
-e DB_CONNECTION_STRING="$(AZURE_CONNECTION_STRING)" \
475+
test-container-$(distroName) bash -c "
476+
source /opt/venv/bin/activate
477+
echo 'Build successful, running tests now on $(distroName) with Azure SQL'
478+
echo 'Using Azure SQL connection string'
479+
python -m pytest -v --junitxml=test-results-$(distroName).xml --cov=. --cov-report=xml:coverage-$(distroName).xml --capture=tee-sys --cache-clear
480+
"
481+
else
482+
# Local SQL Server testing
483+
SQLSERVER_IP=$(docker inspect sqlserver-$(distroName) --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}')
484+
echo "SQL Server IP: $SQLSERVER_IP"
485+
486+
docker exec \
487+
-e DB_CONNECTION_STRING="Server=$SQLSERVER_IP;Database=TestDB;Uid=SA;Pwd=$(DB_PASSWORD);TrustServerCertificate=yes" \
488+
-e DB_PASSWORD="$(DB_PASSWORD)" \
489+
test-container-$(distroName) bash -c "
490+
source /opt/venv/bin/activate
491+
echo 'Build successful, running tests now on $(distroName)'
492+
echo 'Using connection string: Server=$SQLSERVER_IP;Database=TestDB;Uid=SA;Pwd=***;TrustServerCertificate=yes'
493+
python -m pytest -v --junitxml=test-results-$(distroName).xml --cov=. --cov-report=xml:coverage-$(distroName).xml --capture=tee-sys --cache-clear
494+
"
495+
fi
370496
displayName: 'Run pytest with coverage in $(distroName) container'
497+
condition: or(eq(variables['useAzureSQL'], 'false'), and(eq(variables['useAzureSQL'], 'true'), ne(variables['AZURE_CONNECTION_STRING'], '')))
371498
env:
372499
DB_PASSWORD: $(DB_PASSWORD)
373500
@@ -382,8 +509,10 @@ jobs:
382509
# Clean up containers
383510
docker stop test-container-$(distroName) || true
384511
docker rm test-container-$(distroName) || true
385-
docker stop sqlserver-$(distroName) || true
386-
docker rm sqlserver-$(distroName) || true
512+
if [ "$(useAzureSQL)" = "false" ]; then
513+
docker stop sqlserver-$(distroName) || true
514+
docker rm sqlserver-$(distroName) || true
515+
fi
387516
displayName: 'Clean up $(distroName) containers'
388517
condition: always()
389518
@@ -570,13 +699,13 @@ jobs:
570699
echo "SQL Server IP: $SQLSERVER_IP"
571700
572701
docker exec \
573-
-e DB_CONNECTION_STRING="Driver=ODBC Driver 18 for SQL Server;Server=$SQLSERVER_IP;Database=TestDB;Uid=SA;Pwd=$(DB_PASSWORD);TrustServerCertificate=yes" \
702+
-e DB_CONNECTION_STRING="Server=$SQLSERVER_IP;Database=TestDB;Uid=SA;Pwd=$(DB_PASSWORD);TrustServerCertificate=yes" \
574703
-e DB_PASSWORD="$(DB_PASSWORD)" \
575704
test-container-$(distroName)-$(archName) bash -c "
576705
source /opt/venv/bin/activate
577706
echo 'Build successful, running tests now on $(distroName) ARM64'
578707
echo 'Architecture:' \$(uname -m)
579-
echo 'Using connection string: Driver=ODBC Driver 18 for SQL Server;Server=$SQLSERVER_IP;Database=TestDB;Uid=SA;Pwd=***;TrustServerCertificate=yes'
708+
echo 'Using connection string: Server=$SQLSERVER_IP;Database=TestDB;Uid=SA;Pwd=***;TrustServerCertificate=yes'
580709
python main.py
581710
python -m pytest -v --junitxml=test-results-$(distroName)-$(archName).xml --cov=. --cov-report=xml:coverage-$(distroName)-$(archName).xml --capture=tee-sys --cache-clear
582711
"
@@ -778,12 +907,12 @@ jobs:
778907
echo "SQL Server IP: $SQLSERVER_IP"
779908
780909
docker exec \
781-
-e DB_CONNECTION_STRING="Driver=ODBC Driver 18 for SQL Server;Server=$SQLSERVER_IP;Database=TestDB;Uid=SA;Pwd=$(DB_PASSWORD);TrustServerCertificate=yes" \
910+
-e DB_CONNECTION_STRING="Server=$SQLSERVER_IP;Database=TestDB;Uid=SA;Pwd=$(DB_PASSWORD);TrustServerCertificate=yes" \
782911
-e DB_PASSWORD="$(DB_PASSWORD)" \
783912
test-container-rhel9 bash -c "
784913
source myvenv/bin/activate
785914
echo 'Build successful, running tests now on RHEL 9'
786-
echo 'Using connection string: Driver=ODBC Driver 18 for SQL Server;Server=$SQLSERVER_IP;Database=TestDB;Uid=SA;Pwd=***;TrustServerCertificate=yes'
915+
echo 'Using connection string: Server=$SQLSERVER_IP;Database=TestDB;Uid=SA;Pwd=***;TrustServerCertificate=yes'
787916
python main.py
788917
python -m pytest -v --junitxml=test-results-rhel9.xml --cov=. --cov-report=xml:coverage-rhel9.xml --capture=tee-sys --cache-clear
789918
"
@@ -997,13 +1126,13 @@ jobs:
9971126
echo "SQL Server IP: $SQLSERVER_IP"
9981127
9991128
docker exec \
1000-
-e DB_CONNECTION_STRING="Driver=ODBC Driver 18 for SQL Server;Server=$SQLSERVER_IP;Database=TestDB;Uid=SA;Pwd=$(DB_PASSWORD);TrustServerCertificate=yes" \
1129+
-e DB_CONNECTION_STRING="Server=$SQLSERVER_IP;Database=TestDB;Uid=SA;Pwd=$(DB_PASSWORD);TrustServerCertificate=yes" \
10011130
-e DB_PASSWORD="$(DB_PASSWORD)" \
10021131
test-container-rhel9-arm64 bash -c "
10031132
source myvenv/bin/activate
10041133
echo 'Build successful, running tests now on RHEL 9 ARM64'
10051134
echo 'Architecture:' \$(uname -m)
1006-
echo 'Using connection string: Driver=ODBC Driver 18 for SQL Server;Server=$SQLSERVER_IP;Database=TestDB;Uid=SA;Pwd=***;TrustServerCertificate=yes'
1135+
echo 'Using connection string: Server=$SQLSERVER_IP;Database=TestDB;Uid=SA;Pwd=***;TrustServerCertificate=yes'
10071136
python -m pytest -v --junitxml=test-results-rhel9-arm64.xml --cov=. --cov-report=xml:coverage-rhel9-arm64.xml --capture=tee-sys --cache-clear
10081137
"
10091138
displayName: 'Run pytest with coverage in RHEL 9 ARM64 container'
@@ -1225,13 +1354,13 @@ jobs:
12251354
echo "SQL Server IP: $SQLSERVER_IP"
12261355
12271356
docker exec \
1228-
-e DB_CONNECTION_STRING="Driver=ODBC Driver 18 for SQL Server;Server=$SQLSERVER_IP;Database=TestDB;Uid=SA;Pwd=$(DB_PASSWORD);TrustServerCertificate=yes" \
1357+
-e DB_CONNECTION_STRING="Server=$SQLSERVER_IP;Database=TestDB;Uid=SA;Pwd=$(DB_PASSWORD);TrustServerCertificate=yes" \
12291358
-e DB_PASSWORD="$(DB_PASSWORD)" \
12301359
test-container-alpine bash -c "
12311360
echo 'Build successful, running tests now on Alpine x86_64'
12321361
echo 'Architecture:' \$(uname -m)
12331362
echo 'Alpine version:' \$(cat /etc/alpine-release)
1234-
echo 'Using connection string: Driver=ODBC Driver 18 for SQL Server;Server=$SQLSERVER_IP;Database=TestDB;Uid=SA;Pwd=***;TrustServerCertificate=yes'
1363+
echo 'Using connection string: Server=$SQLSERVER_IP;Database=TestDB;Uid=SA;Pwd=***;TrustServerCertificate=yes'
12351364
12361365
# Activate virtual environment
12371366
source /workspace/venv/bin/activate
@@ -1467,13 +1596,13 @@ jobs:
14671596
echo "SQL Server IP: $SQLSERVER_IP"
14681597
14691598
docker exec \
1470-
-e DB_CONNECTION_STRING="Driver=ODBC Driver 18 for SQL Server;Server=$SQLSERVER_IP;Database=TestDB;Uid=SA;Pwd=$(DB_PASSWORD);TrustServerCertificate=yes" \
1599+
-e DB_CONNECTION_STRING="Server=$SQLSERVER_IP;Database=TestDB;Uid=SA;Pwd=$(DB_PASSWORD);TrustServerCertificate=yes" \
14711600
-e DB_PASSWORD="$(DB_PASSWORD)" \
14721601
test-container-alpine-arm64 bash -c "
14731602
echo 'Build successful, running tests now on Alpine ARM64'
14741603
echo 'Architecture:' \$(uname -m)
14751604
echo 'Alpine version:' \$(cat /etc/alpine-release)
1476-
echo 'Using connection string: Driver=ODBC Driver 18 for SQL Server;Server=$SQLSERVER_IP;Database=TestDB;Uid=SA;Pwd=***;TrustServerCertificate=yes'
1605+
echo 'Using connection string: Server=$SQLSERVER_IP;Database=TestDB;Uid=SA;Pwd=***;TrustServerCertificate=yes'
14771606
14781607
# Activate virtual environment
14791608
source /workspace/venv/bin/activate
@@ -1574,7 +1703,7 @@ jobs:
15741703
lcov_cobertura total.info --output unified-coverage/coverage.xml
15751704
displayName: 'Generate unified coverage (Python + C++)'
15761705
env:
1577-
DB_CONNECTION_STRING: 'Driver=ODBC Driver 18 for SQL Server;Server=tcp:127.0.0.1,1433;Database=master;Uid=SA;Pwd=$(DB_PASSWORD);TrustServerCertificate=yes'
1706+
DB_CONNECTION_STRING: 'Server=tcp:127.0.0.1,1433;Database=master;Uid=SA;Pwd=$(DB_PASSWORD);TrustServerCertificate=yes'
15781707
DB_PASSWORD: $(DB_PASSWORD)
15791708
15801709
- task: PublishTestResults@2

0 commit comments

Comments
 (0)