From 2d1d892e3ce5acf794bfd5f2aefa49e9aceaa7b7 Mon Sep 17 00:00:00 2001 From: Jake Ginnivan Date: Mon, 22 Jun 2015 17:17:30 +0100 Subject: [PATCH 1/4] Switching build to appveyor --- Build.cmd | 9 ------- ConventionTests.proj | 58 -------------------------------------------- appveyor.yml | 27 +++++++++++++++++++++ 3 files changed, 27 insertions(+), 67 deletions(-) delete mode 100644 Build.cmd delete mode 100644 ConventionTests.proj create mode 100644 appveyor.yml diff --git a/Build.cmd b/Build.cmd deleted file mode 100644 index 3886073..0000000 --- a/Build.cmd +++ /dev/null @@ -1,9 +0,0 @@ -@ECHO OFF - -SET msbuild="%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" - -%msbuild% ConventionTests.proj - -IF NOT ERRORLEVEL 0 EXIT /B %ERRORLEVEL% - -pause \ No newline at end of file diff --git a/ConventionTests.proj b/ConventionTests.proj deleted file mode 100644 index d0b11ef..0000000 --- a/ConventionTests.proj +++ /dev/null @@ -1,58 +0,0 @@ - - - - $(MSBuildProjectDirectory)\ - Any CPU - Debug - $(Root)tools\MSBuildCommunityTasks - $(MSBuildProjectDirectory)\packages\NUnit.Runners.2.6.2\tools\ - $(NUnitHome)nunit-console.exe - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0.0.0.0 - - - - - - diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..fe83c2a --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,27 @@ +install: + - choco install gitversion.portable -pre -y + +assembly_info: + patch: false + +before_build: + - nuget restore + - gitversion /l console /output buildserver /updateAssemblyInfo + +platform: + - Any CPU + +configuration: + - Release + +build: + project: ConventionTests.sln + +after_build: + - cmd: ECHO nuget pack TestStack.ConventionTests\TestStack.ConventionTests.nuspec -version "%GitVersion_NuGetVersion%" -OutputDir build\Artifacts -BasePath TestStack.ConventionTests\bin\%CONFIGURATION% + - cmd: nuget pack TestStack.ConventionTests\TestStack.ConventionTests.nuspec -version "%GitVersion_NuGetVersion%" -OutputDir build\Artifacts -BasePath TestStack.ConventionTests\bin\%CONFIGURATION% + - cmd: ECHO nuget pack TestStack.ConventionTests.Autofac\TestStack.ConventionTests.Autofac.nuspec -version "%GitVersion_NuGetVersion%" -OutputDir build\Artifacts -BasePath TestStack.ConventionTests.Autofac\bin\%CONFIGURATION% + - cmd: nuget pack TestStack.ConventionTests.Autofac\TestStack.ConventionTests.Autofac.nuspec -version "%GitVersion_NuGetVersion%" -OutputDir build\Artifacts -BasePath TestStack.ConventionTests\bin\%CONFIGURATION% + + - cmd: appveyor PushArtifact "build\Artifacts\TestStack.ConventionTests.%GitVersion_NuGetVersion%.nupkg" + - cmd: appveyor PushArtifact "build\Artifacts\TestStack.ConventionTests.Autofac.%GitVersion_NuGetVersion%.nupkg" \ No newline at end of file From 770f4e3d75488b2217ec7ceed6a3b394e680f9ce Mon Sep 17 00:00:00 2001 From: Jake Ginnivan Date: Mon, 22 Jun 2015 17:20:29 +0100 Subject: [PATCH 2/4] Removed output paths --- appveyor.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index fe83c2a..959e380 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -18,10 +18,10 @@ build: project: ConventionTests.sln after_build: - - cmd: ECHO nuget pack TestStack.ConventionTests\TestStack.ConventionTests.nuspec -version "%GitVersion_NuGetVersion%" -OutputDir build\Artifacts -BasePath TestStack.ConventionTests\bin\%CONFIGURATION% - - cmd: nuget pack TestStack.ConventionTests\TestStack.ConventionTests.nuspec -version "%GitVersion_NuGetVersion%" -OutputDir build\Artifacts -BasePath TestStack.ConventionTests\bin\%CONFIGURATION% - - cmd: ECHO nuget pack TestStack.ConventionTests.Autofac\TestStack.ConventionTests.Autofac.nuspec -version "%GitVersion_NuGetVersion%" -OutputDir build\Artifacts -BasePath TestStack.ConventionTests.Autofac\bin\%CONFIGURATION% - - cmd: nuget pack TestStack.ConventionTests.Autofac\TestStack.ConventionTests.Autofac.nuspec -version "%GitVersion_NuGetVersion%" -OutputDir build\Artifacts -BasePath TestStack.ConventionTests\bin\%CONFIGURATION% + - cmd: ECHO nuget pack TestStack.ConventionTests\TestStack.ConventionTests.nuspec -version "%GitVersion_NuGetVersion%" -BasePath TestStack.ConventionTests\bin\%CONFIGURATION% + - cmd: nuget pack TestStack.ConventionTests\TestStack.ConventionTests.nuspec -version "%GitVersion_NuGetVersion%" -BasePath TestStack.ConventionTests\bin\%CONFIGURATION% + - cmd: ECHO nuget pack TestStack.ConventionTests.Autofac\TestStack.ConventionTests.Autofac.nuspec -version "%GitVersion_NuGetVersion%" -BasePath TestStack.ConventionTests.Autofac\bin\%CONFIGURATION% + - cmd: nuget pack TestStack.ConventionTests.Autofac\TestStack.ConventionTests.Autofac.nuspec -version "%GitVersion_NuGetVersion%" -BasePath TestStack.ConventionTests.Autofac\bin\%CONFIGURATION% - - cmd: appveyor PushArtifact "build\Artifacts\TestStack.ConventionTests.%GitVersion_NuGetVersion%.nupkg" - - cmd: appveyor PushArtifact "build\Artifacts\TestStack.ConventionTests.Autofac.%GitVersion_NuGetVersion%.nupkg" \ No newline at end of file + - cmd: appveyor PushArtifact "TestStack.ConventionTests.%GitVersion_NuGetVersion%.nupkg" + - cmd: appveyor PushArtifact "TestStack.ConventionTests.Autofac.%GitVersion_NuGetVersion%.nupkg" \ No newline at end of file From cf043eb481ef6f9a392bbb58da2960e626ec9021 Mon Sep 17 00:00:00 2001 From: Jake Ginnivan Date: Mon, 22 Jun 2015 17:29:44 +0100 Subject: [PATCH 3/4] Building as debug --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 959e380..5712680 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -12,7 +12,7 @@ platform: - Any CPU configuration: - - Release + - Debug build: project: ConventionTests.sln From bafcd2a60b0084b9940a516c2ecf6ff5807d8419 Mon Sep 17 00:00:00 2001 From: Jake Ginnivan Date: Mon, 22 Jun 2015 17:43:29 +0100 Subject: [PATCH 4/4] Make failing test explicit so shadow copy can stay enabled --- Samples/SampleApp.Tests/SqlScriptTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Samples/SampleApp.Tests/SqlScriptTests.cs b/Samples/SampleApp.Tests/SqlScriptTests.cs index 1670778..c86a91b 100644 --- a/Samples/SampleApp.Tests/SqlScriptTests.cs +++ b/Samples/SampleApp.Tests/SqlScriptTests.cs @@ -10,6 +10,7 @@ public class SqlScriptTests { [Test] + [Explicit] // Only works when shadow copy disabled for tests public void SqlScriptsShouldBeEmbeddedResources() { Convention.Is(new FilesAreEmbeddedResources(".sql"), new ProjectFileItems(typeof(DomainClass).Assembly));