diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml new file mode 100644 index 00000000..6ae3bbd4 --- /dev/null +++ b/.github/workflows/coveralls.yml @@ -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 \ No newline at end of file diff --git a/ACadSharp.Tests/ACadSharp.Tests.csproj b/ACadSharp.Tests/ACadSharp.Tests.csproj index 72585c0a..0dad927e 100644 --- a/ACadSharp.Tests/ACadSharp.Tests.csproj +++ b/ACadSharp.Tests/ACadSharp.Tests.csproj @@ -12,10 +12,14 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/ACadSharp.Tests/IO/IOTests.cs b/ACadSharp.Tests/IO/IOTests.cs index 54ab8aa6..d0215b7a 100644 --- a/ACadSharp.Tests/IO/IOTests.cs +++ b/ACadSharp.Tests/IO/IOTests.cs @@ -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; } diff --git a/ACadSharp.Tests/IO/LocalSampleTests.cs b/ACadSharp.Tests/IO/LocalSampleTests.cs index 1a53ed01..9b13bc3b 100644 --- a/ACadSharp.Tests/IO/LocalSampleTests.cs +++ b/ACadSharp.Tests/IO/LocalSampleTests.cs @@ -50,7 +50,6 @@ public void ReadUserDxf(string test) } } - [Theory] [MemberData(nameof(StressFiles))] public void ReadStressFiles(string test) diff --git a/ACadSharp.sln b/ACadSharp.sln index b54d7ca0..70b880ca 100644 --- a/ACadSharp.sln +++ b/ACadSharp.sln @@ -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 diff --git a/README.md b/README.md index 08b54094..390e3d58 100644 --- a/README.md +++ b/README.md @@ -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.