use azure pipelines instead of appveyor for builds

* trial azure pipelines

[skip ci]

* use vs2017

* build pr commits

* include codecov and update test nuget

* add codecov call

* add publish test results step

* include coverlet package for test coverage and allow coverlet dynamic public types

* add azure pipelines badge and remove appveyor badge

* add nuget pack step

* use build configuration variable for nuget pack and move after build

* fix path to package to pack

* change nuget to dotnet pack

* remove old codecov related tools
This commit is contained in:
Eliot Jones
2019-07-09 21:21:11 +01:00
committed by GitHub
parent 3c49371c68
commit 283e1d38fa
9 changed files with 70 additions and 22 deletions

View File

@@ -1,9 +0,0 @@
@echo off
cd src\CodeCoverage
nuget restore packages.config -PackagesDirectory .
cd ..
CodeCoverage\OpenCover.4.6.519\tools\OpenCover.Console.exe -target:"dotnet.exe" -targetargs:"test UglyToad.PdfPig.Tests\UglyToad.PdfPig.Tests.csproj --framework netcoreapp2.0 -c debug" -register:user -output:.\test-results.xml -hideskipped:All -returntargetcode -oldStyle -filter:"+[UglyToad.PdfPig*]* -[UglyToad.PdfPig.Tests*]*"

Binary file not shown.

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="OpenCover" version="4.6.519" />
</packages>

View File

@@ -1,5 +1,6 @@
namespace UglyToad.PdfPig.Tests
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
@@ -19,6 +20,12 @@
foreach (var type in types)
{
// Skip coverage measuring instrumentation classes.
if (type.FullName.StartsWith("Coverlet", StringComparison.OrdinalIgnoreCase))
{
continue;
}
if (type.IsPublic)
{
publicTypeNames.Add(type.FullName);

View File

@@ -81,7 +81,12 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="Codecov" Version="1.5.0" />
<PackageReference Include="coverlet.msbuild" Version="2.6.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="System.Drawing.Common" Version="4.5.0-preview2-26406-04" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.extensibility.execution" Version="2.4.1" />