2
2
# environment configuration #
3
3
# ---------------------------------#
4
4
5
+ # Build worker image (VM template)
6
+ image : Visual Studio 2017
7
+
5
8
# scripts that run after cloning repository
6
9
install :
10
+ # install SQL Server 2008 R2 SP2 Express (not included in VS 2017 image; see: https://www.appveyor.com/docs/build-environment/#databases)
11
+ - curl -L -O -S -s https://download.microsoft.com/download/0/4/B/04BE03CD-EAF3-4797-9D8D-2E08E316C998/SQLEXPR_x64_ENU.exe
12
+ - SQLEXPR_x64_ENU.exe /QUIET /IACCEPTSQLSERVERLICENSETERMS /ACTION=INSTALL /FEATURES=SQL /INSTANCENAME=SQL2008R2SP2 /TCPENABLED=1 /SECURITYMODE=SQL /SAPWD=Password12! /ADDCURRENTUSERASSQLADMIN /SQLSVCACCOUNT="NT AUTHORITY\Network Service" /AGTSVCACCOUNT="NT AUTHORITY\Network Service"
13
+
14
+ # install SQL Server 2012 SP1 Express (not included in VS 2017 image; see: https://www.appveyor.com/docs/build-environment/#databases)
15
+ - curl -L -O -S -s https://download.microsoft.com/download/5/2/9/529FEF7B-2EFB-439E-A2D1-A1533227CD69/SQLEXPR_x64_ENU.exe
16
+ - 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"
17
+
18
+ # enable dynamic TCP ports for 2008 and 2012 SQL Server instances (so they can be run simultaneously)
19
+ - ps : set-itemproperty -path 'HKLM:\software\microsoft\microsoft sql server\mssql10_50.SQL2008R2SP2\mssqlserver\supersocketnetlib\tcp\ipall' -name TcpDynamicPorts -value '0'
20
+ - ps : set-itemproperty -path 'HKLM:\software\microsoft\microsoft sql server\mssql10_50.SQL2008R2SP2\mssqlserver\supersocketnetlib\tcp\ipall' -name TcpPort -value ''
21
+ - ps : set-itemproperty -path 'HKLM:\software\microsoft\microsoft sql server\mssql11.SQL2012SP1\mssqlserver\supersocketnetlib\tcp\ipall' -name TcpDynamicPorts -value '0'
22
+ - ps : set-itemproperty -path 'HKLM:\software\microsoft\microsoft sql server\mssql11.SQL2012SP1\mssqlserver\supersocketnetlib\tcp\ipall' -name TcpPort -value ''
23
+
7
24
# install MySQL 5.6
8
25
# - curl -L -O -S -s https://dev.mysql.com/get/Downloads/MySQLInstaller/mysql-installer-web-community-5.6.36.0.msi
9
26
# - msiexec /i mysql-installer-web-community-5.6.36.0.msi /quiet
@@ -32,16 +49,8 @@ install:
32
49
- 7z x postgis-bundle-pg96-2.3.2x64.zip > nul
33
50
- xcopy /s /y /q postgis-bundle-pg96-2.3.2x64 "C:\Program Files\PostgreSQL\9.6"
34
51
35
- # enable dynamic TCP ports for 2008 and 2012 SQL Server instances (so they can be run simultaneously)
36
- - ps : set-itemproperty -path 'HKLM:\software\microsoft\microsoft sql server\mssql10_50.SQL2008R2SP2\mssqlserver\supersocketnetlib\tcp\ipall' -name TcpDynamicPorts -value '0'
37
- - ps : set-itemproperty -path 'HKLM:\software\microsoft\microsoft sql server\mssql10_50.SQL2008R2SP2\mssqlserver\supersocketnetlib\tcp\ipall' -name TcpPort -value ''
38
- - ps : set-itemproperty -path 'HKLM:\software\microsoft\microsoft sql server\mssql11.SQL2012SP1\mssqlserver\supersocketnetlib\tcp\ipall' -name TcpDynamicPorts -value '0'
39
- - ps : set-itemproperty -path 'HKLM:\software\microsoft\microsoft sql server\mssql11.SQL2012SP1\mssqlserver\supersocketnetlib\tcp\ipall' -name TcpPort -value ''
40
-
41
52
# start services required for build/tests
42
53
services :
43
- - mssql2008r2sp2 # start SQL Server 2008 R2 SP2 Express
44
- - mssql2012sp1 # start SQL Server 2012 Express
45
54
# - mysql56 # start MySQL 5.6
46
55
# - mysql57 # start MySQL 5.7
47
56
- postgresql96 # start PostgreSQL 9.6
@@ -50,9 +59,6 @@ services:
50
59
# build configuration #
51
60
# ---------------------------------#
52
61
53
- # build platform, i.e. x86, x64, Any CPU
54
- platform : Any CPU
55
-
56
62
# build configuration, i.e. Debug, Release, etc.
57
63
configuration : Release
58
64
@@ -62,26 +68,16 @@ build:
62
68
project : NHibernate.Spatial.sln
63
69
verbosity : minimal
64
70
71
+ # scripts to run before build
72
+ before_build :
73
+ - cmd : nuget restore
74
+ - cmd : dotnet --version
75
+ - cmd : dotnet restore --verbosity minimal
76
+
65
77
# ---------------------------------#
66
78
# tests configuration #
67
79
# ---------------------------------#
68
80
69
- # only run each test assembly once
70
- # NOTE: Must explicitly specify which assemblies to test, otherwise AppVeyor will default to Auto mode, which will recursively
71
- # scan the project folder for any test assembly (see: https://www.appveyor.com/docs/running-tests)
72
- # Since the test projects reference each other, this will then result in the referenced DLLs being "discovered" and run
73
- # multiple times (once in the original project's build folder and then again in each referencing project's build folder)
74
- test :
75
- assemblies :
76
- only :
77
- - Tests.NHibernate.Spatial.MsSql2008\bin\Release\Tests.NHibernate.Spatial.MsSql2008.dll
78
- - Tests.NHibernate.Spatial.MsSql2012\bin\Release\Tests.NHibernate.Spatial.MsSql2012.dll
79
- # Disable MySQL tests until issue #87 is resolved
80
- # - Tests.NHibernate.Spatial.MySQL\bin\Release\Tests.NHibernate.Spatial.MySQL.dll
81
- # - Tests.NHibernate.Spatial.MySQL57\bin\Release\Tests.NHibernate.Spatial.MySQL57.dll
82
- - Tests.NHibernate.Spatial.PostGis\bin\Release\Tests.NHibernate.Spatial.PostGis.dll
83
- - Tests.NHibernate.Spatial.PostGis20\bin\Release\Tests.NHibernate.Spatial.PostGis20.dll
84
-
85
81
# scripts to run before tests
86
82
before_test :
87
83
# setup SQL Server 2008
@@ -106,3 +102,17 @@ before_test:
106
102
# setup PostgreSQL 9.6
107
103
- SET psql="C:\Program Files\PostgreSQL\9.6\bin\psql.exe"
108
104
- cmd /c "%psql% -q -p 5432 -U postgres -f Tests.NHibernate.Spatial.PostGis20\nhsp_test.sql"
105
+
106
+ 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"
109
+ # 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
112
+ - cmd : dotnet test -c Release --no-build --logger "trx;LogFileName=PostGis.trx" --results-directory %APPVEYOR_BUILD_FOLDER% Tests.NHibernate.Spatial.PostGis
113
+ - cmd : dotnet test -c Release --no-build --logger "trx;LogFileName=PostGis20.trx" --results-directory %APPVEYOR_BUILD_FOLDER% Tests.NHibernate.Spatial.PostGis20
114
+
115
+ after_test :
116
+ - 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))
0 commit comments