From 66a98cfc93416624b4609effab977d9f47bd22e7 Mon Sep 17 00:00:00 2001 From: Ivan Maximov Date: Mon, 22 Jan 2024 11:37:21 +0300 Subject: [PATCH] Simplify code coverage --- .github/workflows/label.yml | 1 - .github/workflows/test.yml | 4 ++-- src/Directory.Build.targets | 8 -------- src/SteroidsDI.Tests/SteroidsDI.Tests.csproj | 2 +- src/SteroidsDI.sln | 3 +-- 5 files changed, 4 insertions(+), 14 deletions(-) delete mode 100644 src/Directory.Build.targets diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml index 421efaf..f34d7e1 100644 --- a/.github/workflows/label.yml +++ b/.github/workflows/label.yml @@ -17,6 +17,5 @@ jobs: steps: - uses: actions/labeler@v5 with: - sync-labels: "" repo-token: "${{ secrets.GITHUB_TOKEN }}" continue-on-error: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bee15f5..8230710 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -60,12 +60,12 @@ jobs: run: dotnet build --no-restore -c Debug - name: Test solution [Debug] working-directory: src - run: dotnet test --no-restore -p:CollectCoverage=true + run: dotnet test --no-restore -p:CollectCoverage=true -p:CoverletOutputFormat=opencover -p:CoverletOutput=../.coverage/ - name: Upload coverage to codecov if: ${{ startsWith(matrix.os, 'ubuntu') }} uses: codecov/codecov-action@v3 with: - files: .coverage/SteroidsDI.Tests/coverage.net8.opencover.xml + files: src/.coverage/*.opencover.xml buildcheck: needs: diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets deleted file mode 100644 index 6535dc3..0000000 --- a/src/Directory.Build.targets +++ /dev/null @@ -1,8 +0,0 @@ - - - - opencover - $(MSBuildThisFileDirectory)../.coverage/$(AssemblyName)/ - - - diff --git a/src/SteroidsDI.Tests/SteroidsDI.Tests.csproj b/src/SteroidsDI.Tests/SteroidsDI.Tests.csproj index 454e204..291f87b 100644 --- a/src/SteroidsDI.Tests/SteroidsDI.Tests.csproj +++ b/src/SteroidsDI.Tests/SteroidsDI.Tests.csproj @@ -14,7 +14,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/SteroidsDI.sln b/src/SteroidsDI.sln index fcaa946..b62c7de 100644 --- a/src/SteroidsDI.sln +++ b/src/SteroidsDI.sln @@ -8,7 +8,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution ..\.editorconfig = ..\.editorconfig ..\.gitignore = ..\.gitignore Directory.Build.props = Directory.Build.props - Directory.Build.targets = Directory.Build.targets ..\assets\icon.png = ..\assets\icon.png ..\LICENSE.md = ..\LICENSE.md ..\README.md = ..\README.md @@ -49,7 +48,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{ ..\.github\workflows\test.yml = ..\.github\workflows\test.yml EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Benchmarks", "Benchmarks\Benchmarks.csproj", "{3A3F37A4-27BB-4A35-80A3-1973DDE6586B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Benchmarks", "Benchmarks\Benchmarks.csproj", "{3A3F37A4-27BB-4A35-80A3-1973DDE6586B}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution