Skip to content

Commit

Permalink
Issue #231 Implement azure pipelines (#236)
Browse files Browse the repository at this point in the history
* Set up CI with Azure Pipelines
* Modernize Nuget configuration
* Run unit tests
* Publish tested build output
* Only archive SimpleBrowser output
  • Loading branch information
kevingy committed Sep 3, 2019
1 parent d0944d2 commit 7c10ce7
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 83 deletions.
6 changes: 0 additions & 6 deletions .nuget/NuGet.Config

This file was deleted.

Binary file removed .nuget/NuGet.exe
Binary file not shown.
71 changes: 0 additions & 71 deletions .nuget/NuGet.targets

This file was deleted.

6 changes: 0 additions & 6 deletions SimpleBrowser.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample", "Sample\Sample.csp
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleBrowser.UnitTests", "SimpleBrowser.UnitTests\SimpleBrowser.UnitTests.csproj", "{C0A2F5F6-088D-44E8-BBE3-400A8F84C0D3}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{7C5CA587-1761-43E7-87E5-D7EB62CE2F00}"
ProjectSection(SolutionItems) = preProject
.nuget\NuGet.exe = .nuget\NuGet.exe
.nuget\NuGet.targets = .nuget\NuGet.targets
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
4 changes: 4 additions & 0 deletions SimpleBrowser/SimpleBrowser.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="2.9.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<PackageReference Include="Westwind.RazorHosting" Version="3.3.9" Condition="'$(TargetFramework)' == 'net452'" />
<PackageReference Include="RazorLight" Version="2.0.0-beta1" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
Expand Down
41 changes: 41 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# ASP.NET Core
# Build and test ASP.NET Core projects targeting .NET Core.
# Add steps that run tests, create a NuGet package, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core

trigger:
- master

pool:
vmImage: 'ubuntu-latest'

variables:
buildConfiguration: 'Release'

steps:
- script: dotnet build --configuration $(buildConfiguration)
displayName: 'dotnet build $(buildConfiguration)'

- task: DotNetCoreCLI@2
displayName: 'dotnet test $(buildConfiguration)'
inputs:
command: test
projects: '**/*Tests/*.csproj'
arguments: '--configuration $(buildConfiguration)'

- task: CopyFiles@2
displayName: 'Copy Files to: $(build.artifactstagingdirectory)'
inputs:
SourceFolder: '$(agent.builddirectory)'
Contents: |
**/SimpleBrowser/bin/**/SimpleBrowser.dll
**/SimpleBrowser/bin/**/SimpleBrowser.pdb
TargetFolder: '$(build.artifactstagingdirectory)'
condition: succeededOrFailed()

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
artifactName: drop
condition: succeededOrFailed()

0 comments on commit 7c10ce7

Please sign in to comment.