@@ -20,7 +20,9 @@ var rootDir = Directory ("./");
2020var sourceDir = Directory ( "./src" ) ;
2121var buildDir = Directory ( "./localBuild" ) ;
2222var 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" ) ;
2426var sqlBulkLoaderOutputDir = Directory ( buildDir . Path + "/SQLBulkLoaderUtility" ) ;
2527
2628//////////////////////////////////////////////////////////////////////
@@ -52,18 +54,46 @@ Task ("BuildSolution")
5254 MSBuild ( sourceDir . Path + "/SQLBulkLoader.sln" , settings ) ;
5355 } ) ;
5456
55- Task ( "BuildIntegrationTests " )
57+ Task ( "BuildIntegrationSqlServerTests " )
5658 . IsDependentOn ( "Restore-NuGet-Packages" )
5759 . Does ( ( ) => {
5860 var settings = new MSBuildSettings ( )
5961 . SetConfiguration ( configuration )
6062 . SetVerbosity ( Verbosity . Minimal )
61- . WithProperty ( "OutDir" , MakeAbsolute ( integrationTestOutputDir ) . FullPath )
63+ . WithProperty ( "OutDir" , MakeAbsolute ( IntegrationSqlServerTestsOutputDir ) . FullPath )
6264 . WithProperty ( "Version" , version )
6365 . WithProperty ( "AssemblyVersion" , version )
6466 . WithProperty ( "FileVersion" , version ) ;
6567
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 ) ;
6797 } ) ;
6898
6999Task ( "BuildSqlBulkLoader" )
@@ -81,13 +111,19 @@ Task ("BuildSqlBulkLoader")
81111 } ) ;
82112
83113Task ( "Run-Unit-Tests" )
84- . IsDependentOn ( "BuildIntegrationTests" )
114+ . IsDependentOn ( "BuildIntegrationSqlServerTests" )
115+ . IsDependentOn ( "BuildIntegrationPostgreSqlTests" )
116+ . IsDependentOn ( "BuildIntegrationSharedTests" )
85117 . Does ( ( ) => {
86118 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" ) ;
88124 } ) ;
89125
90- Task ( "BuildPackages " )
126+ Task ( "BuildSqlServerPackages " )
91127 . IsDependentOn ( "Restore-NuGet-Packages" )
92128 . IsDependentOn ( "BuildSqlBulkLoader" )
93129 . Does ( ( ) => {
@@ -105,13 +141,37 @@ Task ("BuildPackages")
105141 DotNetCorePack ( projectPath , settings ) ;
106142 } ) ;
107143
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+
108166//////////////////////////////////////////////////////////////////////
109167// TASK TARGETS
110168//////////////////////////////////////////////////////////////////////
111169
112170Task ( "Default" )
113171 . IsDependentOn ( "BuildSolution" )
114- . IsDependentOn ( "BuildIntegrationTests" )
172+ . IsDependentOn ( "BuildIntegrationSqlServerTests" )
173+ . IsDependentOn ( "BuildIntegrationPostgreSqlTests" )
174+ . IsDependentOn ( "BuildIntegrationSharedTests" )
115175 . IsDependentOn ( "BuildSqlBulkLoader" )
116176 . IsDependentOn ( "Run-Unit-Tests" )
117177 . IsDependentOn ( "BuildPackages" ) ;
0 commit comments