Skip to content

Commit

Permalink
Use coverlet.msbuild
Browse files Browse the repository at this point in the history
Ignore leading spaces and tabs in tests
  • Loading branch information
Michael Ganss committed Jul 20, 2018
1 parent aeddccd commit 410bbdf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<ProjectReference Include="..\XmlSchemaClassGenerator\XmlSchemaClassGenerator.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="coverlet.msbuild" Version="2.1.1" />
<PackageReference Include="Microsoft.Net.Compilers.netcore" Version="1.3.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
<PackageReference Include="System.CodeDom" Version="4.5.0" />
Expand Down
2 changes: 1 addition & 1 deletion XmlSchemaClassGenerator.Tests/XmlTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ public enum SimpleType

private static void CompareOutput(string expected, string actual)
{
string Normalize(string input) => Regex.Replace(input, @"\s*\r\n", "\n");
string Normalize(string input) => Regex.Replace(input, @"[ \t]*\r\n", "\n");
Assert.Equal(Normalize(expected), Normalize(actual));
}
}
Expand Down
4 changes: 1 addition & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ build_script:
- dotnet pack --include-symbols --include-source -c Release xscgen
- 7z a -mx=9 XmlSchemaClassGenerator.%APPVEYOR_BUILD_VERSION%.zip ".\XmlSchemaClassGenerator.Console\bin\Release\net45\publish\*"
test_script:
- dotnet build -c Debug
- dotnet tool install --global coverlet.console
- coverlet XmlSchemaClassGenerator.Tests\bin\Debug\netcoreapp2.1\XmlSchemaClassGenerator.Tests.dll --target dotnet --targetargs "test XmlSchemaClassGenerator.Tests\XmlSchemaClassGenerator.Tests.csproj --no-build" --format opencover --output ".\coverage.xml" --exclude "[XmlSampleGenerator]*"
- dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput="..\coverage.xml" XmlSchemaClassGenerator.Tests\XmlSchemaClassGenerator.Tests.csproj /p:Exclude="[XmlSampleGenerator]*"
- pip install codecov
- codecov -f "coverage.xml"
artifacts:
Expand Down

0 comments on commit 410bbdf

Please sign in to comment.