Skip to content

Commit 14080aa

Browse files
authored
Merge pull request #254 from jafin/chore-codecov
Add code coverage badge + output on tests.
2 parents f4921c3 + b3b1b4e commit 14080aa

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ jobs:
2222
shell: pwsh
2323
run: ./ci-build.ps1 "${{matrix.options.framework}}"
2424
- name: Test
25-
run: dotnet test --no-restore --verbosity normal
25+
run: dotnet test --no-restore --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
26+
- name: Codecov
27+
uses: codecov/codecov-action@v1

PdfSharpCore.Test/PdfSharpCore.Test.csproj

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,18 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="FluentAssertions" Version="6.1.0" />
11-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
10+
<PackageReference Include="coverlet.collector" Version="3.1.2">
11+
<PrivateAssets>all</PrivateAssets>
12+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
13+
</PackageReference>
14+
<PackageReference Include="coverlet.msbuild" Version="3.1.2">
15+
<PrivateAssets>all</PrivateAssets>
16+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
17+
</PackageReference>
18+
<PackageReference Include="FluentAssertions" Version="6.7.0" />
19+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
1220
<PackageReference Include="xunit" Version="2.4.1" />
13-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
21+
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
1422
<PrivateAssets>all</PrivateAssets>
1523
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1624
</PackageReference>

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# PdfSharpCore
22

3+
[![codecov.io](https://codecov.io/github/ststeiger/PdfSharpCore/coverage.svg?branch=master)]
4+
(https://codecov.io/github/ststeiger/PdfSharpCore?branch=master)
5+
36
**PdfSharpCore** is a partial port of [PdfSharp.Xamarin](https://github.com/roceh/PdfSharp.Xamarin/) for .NET Standard
47
Additionally MigraDoc has been ported as well (from version 1.32).
58
Images have been implemented with [ImageSharp](https://github.com/JimBobSquarePants/ImageSharp/), which is still in Alpha. They State on their readme that it is still in Alpha status and shouldn't be used in productive environments. Since I didn't find any good alternatives it's still used.
@@ -9,15 +12,14 @@ ImageSharp being Alpha isn't a big issue either since this code isn't by far don
912
###### Example project
1013

1114
There was an example project here. <br />
12-
I've removed it from this project, and put it into a separate solution.
15+
I've removed it from this project, and put it into a separate solution.
1316
You can find it [here](https://github.com/ststeiger/Stammbaum).<br />
1417
There's a default font-resolver in [FontResolver.cs](https://github.com/ststeiger/PdfSharpCore/blob/master/PdfSharpCore/Utils/FontResolver.cs).<br />
1518
It should work on Windows, Linux, OSX and Azure. <br />
1619
Some limitations apply. <br />
17-
See open issues.
18-
20+
See open issues.
1921

20-
## Example usage
22+
## Example usage
2123

2224
```cs
2325
//See the "Example" Project for a MigraDoc example

0 commit comments

Comments
 (0)