diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 24150c5..b596bbf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,18 +29,22 @@ jobs: dotnet-version: 9.x - name: Install dependencies run: dotnet restore + - name: Install dotnet-coverage + run: dotnet tool install -g dotnet-coverage - name: Build run: dotnet build --configuration Release - name: Test with dotnet - run: dotnet test --configuration Release - /p:CollectCoverage=true - /p:CoverletOutputFormat="\"cobertura,json\"" - /p:CoverletOutput=coverage/ - /p:IncludeTestAssembly=false + run: dotnet-coverage collect --output $GITHUB_WORKSPACE/report.cobertura.xml --output-format cobertura "dotnet run --no-build --project $GITHUB_WORKSPACE/src/Sidio.Text.Base32.Tests/Sidio.Text.Base32.Tests.csproj" + - name: ReportGenerator + uses: danielpalme/ReportGenerator-GitHub-Action@v5 + with: + reports: /**/*.cobertura.xml + targetdir: coveragereport/ + reporttypes: "Cobertura" - name: Upload dotnet test results uses: coverallsapp/github-action@v2.3.6 with: github-token: ${{ secrets.GITHUB_TOKEN }} - files: ${{ github.workspace }}/src/Sidio.Text.Base32.Tests/coverage/coverage.net8.0.cobertura.xml ${{ github.workspace }}/src/Sidio.Text.Base32.Tests/coverage/coverage.net9.0.cobertura.xml + files: ${{ github.workspace }}/coveragereport/Cobertura.xml format: cobertura if: ${{ always() }} \ No newline at end of file diff --git a/src/Sidio.Text.Base32.Tests/Sidio.Text.Base32.Tests.csproj b/src/Sidio.Text.Base32.Tests/Sidio.Text.Base32.Tests.csproj index 7750846..33cc54e 100644 --- a/src/Sidio.Text.Base32.Tests/Sidio.Text.Base32.Tests.csproj +++ b/src/Sidio.Text.Base32.Tests/Sidio.Text.Base32.Tests.csproj @@ -7,24 +7,22 @@ false true + + Exe + + true + true - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + @@ -36,4 +34,8 @@ + + + + diff --git a/src/Sidio.Text.Base32.Tests/xunit.runner.json b/src/Sidio.Text.Base32.Tests/xunit.runner.json new file mode 100644 index 0000000..cd59285 --- /dev/null +++ b/src/Sidio.Text.Base32.Tests/xunit.runner.json @@ -0,0 +1,3 @@ +{ + "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json" +} \ No newline at end of file