Skip to content

Commit

Permalink
Merge pull request #404 from DomCR/coverage
Browse files Browse the repository at this point in the history
Code coverage
  • Loading branch information
DomCR authored Aug 6, 2024
2 parents 8cc084f + 168866f commit cc55c48
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 4 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Coveralls

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
SAMPLES_FOLDER: "../../../../samples"
OUTPUT_SAMPLES_FOLDER: "../../../../samples/out"
OUTPUT_SINGLE_CASES_FOLDER: "../../../../samples/out/single_cases"
LOCAL_ENV: "false"
DELTA: "0.00001"
DECIMAL_PRECISION: "5"
RUN_DWG_WRITER_SINGLE_CASES_TEST: "false"

jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test -p:CollectCoverage=true -p:CoverletOutput=TestResults/ -p:CoverletOutputFormat=lcov --no-build --verbosity normal ACadSharp.Tests/
- name: Coveralls action
uses: coverallsapp/github-action@master
with:
github-token: ${{ github.token }}
path-to-lcov: ACadSharp.Tests/TestResults/coverage.info
6 changes: 5 additions & 1 deletion ACadSharp.Tests/ACadSharp.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.*" />
<PackageReference Include="MSTest.TestAdapter" Version="3.*" />
<PackageReference Include="MSTest.TestFramework" Version="3.*" />
<PackageReference Include="coverlet.collector" Version="6.*">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion ACadSharp.Tests/IO/IOTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void DxfToDxf(string test)
{
CadDocument doc = DxfReader.Read(test);

if(doc.Header.Version < ACadVersion.AC1012)
if (doc.Header.Version < ACadVersion.AC1012)
{
return;
}
Expand Down
1 change: 0 additions & 1 deletion ACadSharp.Tests/IO/LocalSampleTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public void ReadUserDxf(string test)
}
}


[Theory]
[MemberData(nameof(StressFiles))]
public void ReadStressFiles(string test)
Expand Down
1 change: 1 addition & 0 deletions ACadSharp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{
.github\workflows\build.yml = .github\workflows\build.yml
.github\workflows\build_n_test.yml = .github\workflows\build_n_test.yml
publish.yml = publish.yml
.github\workflows\coveralls.yml = .github\workflows\coveralls.yml
.github\workflows\wiki-gen.yml = .github\workflows\wiki-gen.yml
EndProjectSection
EndProject
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ACadSharp ![Build&Test](https://github.com/DomCr/ACadSharp/actions/workflows/build_n_test.yml/badge.svg) ![License](https://img.shields.io/github/license/DomCr/ACadSharp) ![nuget](https://img.shields.io/nuget/v/Acadsharp)
ACadSharp ![Build&Test](https://github.com/DomCr/ACadSharp/actions/workflows/build_n_test.yml/badge.svg) ![License](https://img.shields.io/github/license/DomCr/ACadSharp) ![nuget](https://img.shields.io/nuget/v/Acadsharp) [![Coverage Status](https://coveralls.io/repos/github/DomCR/ACadSharp/badge.svg?branch=master)](https://coveralls.io/github/DomCR/ACadSharp?branch=master)
---

C# library to read/write cad files like dxf/dwg.
Expand Down

0 comments on commit cc55c48

Please sign in to comment.