From abaf195f365724fd6887d44b4c04e98d7947b031 Mon Sep 17 00:00:00 2001 From: Jasmin Date: Mon, 11 Mar 2024 10:21:29 +0100 Subject: [PATCH] SIANXSVC-1214: Replace codecov with codeclimate (#22) This also changes the type of the coverage format to cobertura, as the opencover format doesn't seem to be supported. --- .github/workflows/test.yml | 18 +++++++++++++++--- .gitignore | 1 + README.md | 1 + 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e1b351e..b6b3423 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,19 @@ jobs: - run: dotnet restore - name: Run tests with coverage - run: dotnet test --no-restore --collect:"XPlat Code Coverage" /p:CoverletOutputFormat=opencover --logger trx --results-directory "test-results" + run: > + dotnet test + --no-restore + --collect:"XPlat Code Coverage" + /p:CoverletOutputFormat=cobertura + --logger trx + --results-directory "test-results" + -- + DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.ExcludeByFile="**/*.g.cs" - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + - name: Upload coverage to Codeclimate + uses: paambaati/codeclimate-action@v5 + env: + CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} + with: + coverageLocations: "test-results/**/coverage.cobertura.xml:cobertura" diff --git a/.gitignore b/.gitignore index 8d2ee67..b010c12 100644 --- a/.gitignore +++ b/.gitignore @@ -120,5 +120,6 @@ fabric.properties # End of https://www.toptal.com/developers/gitignore/api/dotnetcore,visualstudiocode,intellij+all *.DotSettings.user TestResults/ +/test-results/ *.nupkg *.snupkg diff --git a/README.md b/README.md index e4d3536..347978f 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ dotnet-e5e ========== [![](https://img.shields.io/nuget/v/Anexia.E5E "NuGet version badge")](https://www.nuget.org/packages/Anexia.E5E) [![](https://github.com/anexia/dotnet-e5e/actions/workflows/test.yml/badge.svg?branch=main "Test status")](https://github.com/anexia/dotnet-e5e/actions/workflows/test.yml) +[![Test Coverage](https://api.codeclimate.com/v1/badges/e632c5b96f75865745d9/test_coverage)](https://codeclimate.com/github/anexia/dotnet-e5e/test_coverage) `dotnet-e5e` is a client library for Anexia e5e - our *Functions as a Service* offering. With our client library, it's easy to build functions that can scale indefinitely!