Skip to content
This repository was archived by the owner on Apr 16, 2020. It is now read-only.

Commit

Permalink
Set up CI with Azure Pipelines (#368)
Browse files Browse the repository at this point in the history
* Set up CI with Azure Pipelines

* get environment variables

* task name first

* run tests

* actually run tests

* publish test results

* indent

* log to trx

* remove comment
  • Loading branch information
azure-pipelines[bot] authored and ctaggart committed Sep 22, 2018
1 parent cf6e60e commit 7b8bf67
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ launchSettings.json
launchSettings.json
/*.txt
*.user
.vscode/
.vscode/
*.trx
1 change: 1 addition & 0 deletions NuGet.Config
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear/>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<!-- <add key="appveyor" value="https://ci.appveyor.com/nuget/sourcelink/" /> -->
<!-- <add key="dontet-sourcelink" value="https://dotnet.myget.org/F/sourcelink/api/v3/index.json" protocolVersion="3" /> -->
Expand Down
19 changes: 7 additions & 12 deletions Tests/Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.0-*" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.3.409" PrivateAssets="all" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<!-- test nuget packages: -->
<PackageReference Include="Google.Protobuf" Version="3.5.1" />
<PackageReference Include="Google.Protobuf" Version="3.5.1" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand All @@ -30,10 +31,4 @@
<RemoveDir Directories="$(IntegrationTestPackageDir)" />
<MSBuild Projects="@(ProjectForPackageTesting)" Targets="Pack" RemoveProperties="TargetFramework" Properties="PackageOutputPath=$([System.IO.Path]::GetFullPath($(IntegrationTestPackageDir)))" />
</Target>

<ItemGroup>
<!-- tagged by Test Explorer http://stackoverflow.com/a/22917902/23059 -->
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

</Project>
18 changes: 18 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# https://docs.microsoft.com/vsts/pipelines/languages/dotnet-core

pool:
vmImage: 'VS2017-Win2016'

steps:
- powershell: |
dotnet --info
dotnet build -c Release
cd Tests
dotnet restore
dotnet test -l trx
# displayName: 'build'
- task: PublishTestResults@2
inputs:
testRunner: VSTest
testResultsFiles: '**/*.trx'

0 comments on commit 7b8bf67

Please sign in to comment.