@@ -20,7 +20,9 @@ var rootDir = Directory ("./");
20
20
var sourceDir = Directory ( "./src" ) ;
21
21
var buildDir = Directory ( "./localBuild" ) ;
22
22
var solutionOutputDir = Directory ( buildDir . Path + "/SQLBulkLoaderSolution" ) ;
23
- var integrationTestOutputDir = Directory ( buildDir . Path + "/IntegrationTests" ) ;
23
+ var IntegrationSqlServerTestsOutputDir = Directory ( buildDir . Path + "/IntegrationSqlServerTests" ) ;
24
+ var IntegrationPostgreSqlOutputDir = Directory ( buildDir . Path + "/IntegrationPostgreSqlTests" ) ;
25
+ var IntegrationSharedOutputDir = Directory ( buildDir . Path + "/IntegrationSharedTests" ) ;
24
26
var sqlBulkLoaderOutputDir = Directory ( buildDir . Path + "/SQLBulkLoaderUtility" ) ;
25
27
26
28
//////////////////////////////////////////////////////////////////////
@@ -52,18 +54,46 @@ Task ("BuildSolution")
52
54
MSBuild ( sourceDir . Path + "/SQLBulkLoader.sln" , settings ) ;
53
55
} ) ;
54
56
55
- Task ( "BuildIntegrationTests " )
57
+ Task ( "BuildIntegrationSqlServerTests " )
56
58
. IsDependentOn ( "Restore-NuGet-Packages" )
57
59
. Does ( ( ) => {
58
60
var settings = new MSBuildSettings ( )
59
61
. SetConfiguration ( configuration )
60
62
. SetVerbosity ( Verbosity . Minimal )
61
- . WithProperty ( "OutDir" , MakeAbsolute ( integrationTestOutputDir ) . FullPath )
63
+ . WithProperty ( "OutDir" , MakeAbsolute ( IntegrationSqlServerTestsOutputDir ) . FullPath )
62
64
. WithProperty ( "Version" , version )
63
65
. WithProperty ( "AssemblyVersion" , version )
64
66
. WithProperty ( "FileVersion" , version ) ;
65
67
66
- MSBuild ( sourceDir . Path + "/IntegrationTests/IntegrationTests.csproj" , settings ) ;
68
+ MSBuild ( sourceDir . Path + "/IntegrationSqlServerTests/IntegrationSqlServerTests.csproj" , settings ) ;
69
+ } ) ;
70
+
71
+ Task ( "BuildIntegrationSharedTests" )
72
+ . IsDependentOn ( "Restore-NuGet-Packages" )
73
+ . Does ( ( ) => {
74
+ var settings = new MSBuildSettings ( )
75
+ . SetConfiguration ( configuration )
76
+ . SetVerbosity ( Verbosity . Minimal )
77
+ . WithProperty ( "OutDir" , MakeAbsolute ( IntegrationSharedOutputDir ) . FullPath )
78
+ . WithProperty ( "Version" , version )
79
+ . WithProperty ( "AssemblyVersion" , version )
80
+ . WithProperty ( "FileVersion" , version ) ;
81
+
82
+ MSBuild ( sourceDir . Path + "/IntegrationShared/IntegrationCompatibilityTests.csproj" , settings ) ;
83
+ } ) ;
84
+
85
+ Task ( "BuildIntegrationPostgreSqlTests" )
86
+ . IsDependentOn ( "Restore-NuGet-Packages" )
87
+ . Does ( ( ) => {
88
+ var settings = new MSBuildSettings ( )
89
+ . SetConfiguration ( configuration )
90
+ . SetVerbosity ( Verbosity . Minimal )
91
+ . WithProperty ( "OutDir" , MakeAbsolute ( IntegrationPostgreSqlOutputDir ) . FullPath )
92
+ . WithProperty ( "Version" , version )
93
+ . WithProperty ( "AssemblyVersion" , version )
94
+ . WithProperty ( "FileVersion" , version ) ;
95
+
96
+ MSBuild ( sourceDir . Path + "/IntegrationPostgreSqlTests/IntegrationPostgreSqlTests.csproj" , settings ) ;
67
97
} ) ;
68
98
69
99
Task ( "BuildSqlBulkLoader" )
@@ -81,13 +111,19 @@ Task ("BuildSqlBulkLoader")
81
111
} ) ;
82
112
83
113
Task ( "Run-Unit-Tests" )
84
- . IsDependentOn ( "BuildIntegrationTests" )
114
+ . IsDependentOn ( "BuildIntegrationSqlServerTests" )
115
+ . IsDependentOn ( "BuildIntegrationPostgreSqlTests" )
116
+ . IsDependentOn ( "BuildIntegrationSharedTests" )
85
117
. Does ( ( ) => {
86
118
Information ( "Start Running Tests" ) ;
87
- XUnit2 ( integrationTestOutputDir . Path + "/*Tests.dll" ) ;
119
+ XUnit2 ( IntegrationSqlServerTestsOutputDir . Path + "/*Tests.dll" ) ;
120
+
121
+ XUnit2 ( IntegrationPostgreSqlOutputDir . Path + "/*Tests.dll" ) ;
122
+
123
+ XUnit2 ( IntegrationSharedOutputDir . Path + "/ivaldez.Sql.IntegrationShared.dll" ) ;
88
124
} ) ;
89
125
90
- Task ( "BuildPackages " )
126
+ Task ( "BuildSqlServerPackages " )
91
127
. IsDependentOn ( "Restore-NuGet-Packages" )
92
128
. IsDependentOn ( "BuildSqlBulkLoader" )
93
129
. Does ( ( ) => {
@@ -105,13 +141,37 @@ Task ("BuildPackages")
105
141
DotNetCorePack ( projectPath , settings ) ;
106
142
} ) ;
107
143
144
+ Task ( "BuildPostgrePackages" )
145
+ . IsDependentOn ( "Restore-NuGet-Packages" )
146
+ . IsDependentOn ( "BuildSqlBulkLoader" )
147
+ . Does ( ( ) => {
148
+ var settings = new DotNetCorePackSettings {
149
+ Configuration = "Release" ,
150
+ OutputDirectory = buildDir . Path ,
151
+ IncludeSource = true ,
152
+ IncludeSymbols = true
153
+ } ;
154
+ var projectPath = sourceDir . Path + "/ivaldez.SqlBulkLoader.PostgreSql/ivaldez.SqlBulkLoader.PostgreSql.csproj" ;
155
+
156
+ XmlPoke ( projectPath , "/Project/PropertyGroup/Version" , version ) ;
157
+ XmlPoke ( projectPath , "/Project/PropertyGroup/AssemblyVersion" , version ) ;
158
+
159
+ DotNetCorePack ( projectPath , settings ) ;
160
+ } ) ;
161
+
162
+ Task ( "BuildPackages" )
163
+ . IsDependentOn ( "BuildSqlServerPackages" )
164
+ . IsDependentOn ( "BuildPostgrePackages" ) ;
165
+
108
166
//////////////////////////////////////////////////////////////////////
109
167
// TASK TARGETS
110
168
//////////////////////////////////////////////////////////////////////
111
169
112
170
Task ( "Default" )
113
171
. IsDependentOn ( "BuildSolution" )
114
- . IsDependentOn ( "BuildIntegrationTests" )
172
+ . IsDependentOn ( "BuildIntegrationSqlServerTests" )
173
+ . IsDependentOn ( "BuildIntegrationPostgreSqlTests" )
174
+ . IsDependentOn ( "BuildIntegrationSharedTests" )
115
175
. IsDependentOn ( "BuildSqlBulkLoader" )
116
176
. IsDependentOn ( "Run-Unit-Tests" )
117
177
. IsDependentOn ( "BuildPackages" ) ;
0 commit comments