Skip to content

Commit 63404a9

Browse files
committed
Fix AppVeyor config for MsSql test projects
1 parent be08bb0 commit 63404a9

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

appveyor.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ install:
1515
- curl -L -O -S -s https://download.microsoft.com/download/5/2/9/529FEF7B-2EFB-439E-A2D1-A1533227CD69/SQLEXPR_x64_ENU.exe
1616
- SQLEXPR_x64_ENU.exe /QUIET /IACCEPTSQLSERVERLICENSETERMS /ACTION=INSTALL /FEATURES=SQL /INSTANCENAME=SQL2012SP1 /TCPENABLED=1 /SECURITYMODE=SQL /SAPWD=Password12! /ADDCURRENTUSERASSQLADMIN /SQLSVCACCOUNT="NT AUTHORITY\Network Service" /AGTSVCACCOUNT="NT AUTHORITY\Network Service"
1717

18+
# install x86 CLR types for SQL Server 2012 SP1 (required when running dotnet test for MsSql tests)
19+
- curl -L -O -S -s https://download.microsoft.com/download/4/B/1/4B1E9B0E-A4F3-4715-B417-31C82302A70A/ENU/x86/SQLSysClrTypes.msi
20+
- SQLSysClrTypes.msi /passive
21+
1822
# enable dynamic TCP ports for 2008 and 2012 SQL Server instances (so they can be run simultaneously)
1923
- ps: set-itemproperty -path 'HKLM:\software\microsoft\microsoft sql server\mssql10_50.SQL2008R2SP2\mssqlserver\supersocketnetlib\tcp\ipall' -name TcpDynamicPorts -value '0'
2024
- ps: set-itemproperty -path 'HKLM:\software\microsoft\microsoft sql server\mssql10_50.SQL2008R2SP2\mssqlserver\supersocketnetlib\tcp\ipall' -name TcpPort -value ''
@@ -70,7 +74,6 @@ build:
7074

7175
# scripts to run before build
7276
before_build:
73-
- cmd: nuget restore
7477
- cmd: dotnet --version
7578
- cmd: dotnet restore --verbosity minimal
7679

@@ -104,15 +107,20 @@ before_test:
104107
- cmd /c "%psql% -q -p 5432 -U postgres -f Tests.NHibernate.Spatial.PostGis20\nhsp_test.sql"
105108

106109
test_script:
107-
- cmd: nunit3-console --config=Release --result=MsSql2008.xml;format=AppVeyor "Tests.NHibernate.Spatial.MsSql2008\Tests.NHibernate.Spatial.MsSql2008.csproj"
108-
- cmd: nunit3-console --config=Release --result=MsSql2012.xml;format=AppVeyor "Tests.NHibernate.Spatial.MsSql2012\Tests.NHibernate.Spatial.MsSql2012.csproj"
110+
- cmd: dotnet test -c Release --no-build --logger "trx;LogFileName=MsSql2008.trx" --results-directory %APPVEYOR_BUILD_FOLDER% Tests.NHibernate.Spatial.MsSql2008
111+
- cmd: dotnet test -c Release --no-build --logger "trx;LogFileName=MsSql2012.trx" --results-directory %APPVEYOR_BUILD_FOLDER% Tests.NHibernate.Spatial.MsSql2012
109112
# Disable MySQL tests until issue #87 is resolved
110-
# - cmd: dotnet test -c Release --no-build Tests.NHibernate.Spatial.MySQL
111-
# - cmd: dotnet test -c Release --no-build Tests.NHibernate.Spatial.MySQL57
113+
# - cmd: dotnet test -c Release --no-build --logger "trx;LogFileName=MySQL.trx" --results-directory %APPVEYOR_BUILD_FOLDER% Tests.NHibernate.Spatial.MySQL
114+
# - cmd: dotnet test -c Release --no-build --logger "trx;LogFileName=MySQL57.trx" --results-directory %APPVEYOR_BUILD_FOLDER% Tests.NHibernate.Spatial.MySQL57
112115
- cmd: dotnet test -c Release --no-build --logger "trx;LogFileName=PostGis.trx" --results-directory %APPVEYOR_BUILD_FOLDER% Tests.NHibernate.Spatial.PostGis
113116
- cmd: dotnet test -c Release --no-build --logger "trx;LogFileName=PostGis20.trx" --results-directory %APPVEYOR_BUILD_FOLDER% Tests.NHibernate.Spatial.PostGis20
114117

115118
after_test:
116119
- ps: $wc = New-Object 'System.Net.WebClient'
117-
- ps: $wc.UploadFile("https://ci.appveyor.com/api/testresults/mstest/$($env:APPVEYOR_JOB_ID)", (Resolve-Path PostGis.trx))
118-
- ps: $wc.UploadFile("https://ci.appveyor.com/api/testresults/mstest/$($env:APPVEYOR_JOB_ID)", (Resolve-Path PostGis20.trx))
120+
- ps: $uri = "https://ci.appveyor.com/api/testresults/mstest/$($env:APPVEYOR_JOB_ID)"
121+
- ps: $wc.UploadFile($uri, (Resolve-Path MsSql2008.trx))
122+
- ps: $wc.UploadFile($uri, (Resolve-Path MsSql2012.trx))
123+
# - ps: $wc.UploadFile($uri, (Resolve-Path MySQL.trx))
124+
# - ps: $wc.UploadFile($uri, (Resolve-Path MySQL57.trx))
125+
- ps: $wc.UploadFile($uri, (Resolve-Path PostGis.trx))
126+
- ps: $wc.UploadFile($uri, (Resolve-Path PostGis20.trx))

0 commit comments

Comments
 (0)