Skip to content

Commit 55ca213

Browse files
committed
Integrate CodeCov
1 parent 58371ed commit 55ca213

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
run: dotnet build Auth0.AspNetCore.Authentication.Api.sln --configuration Release --no-restore
2727

2828
- name: Run Unit tests
29-
run: dotnet test tests/Auth0.AspNetCore.Authentication.Api.UnitTests/Auth0.AspNetCore.Authentication.Api.UnitTests.csproj
29+
run: dotnet test tests/Auth0.AspNetCore.Authentication.Api.UnitTests/Auth0.AspNetCore.Authentication.Api.UnitTests.csproj --collect:"XPlat Code coverage" --results-directory ./TestResults/ /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura
3030

3131
- name: Run Integration tests
3232
env:
@@ -44,6 +44,12 @@ jobs:
4444
DPOP_REQUIRED_CLIENT_ID: ${{ secrets.DPOP_REQUIRED_CLIENT_ID }}
4545
DPOP_REQUIRED_CLIENT_SECRET: ${{ secrets.DPOP_REQUIRED_CLIENT_SECRET }}
4646
DPOP_REQUIRED_DPOP_MODE: ${{ secrets.DPOP_REQUIRED_DPOP_MODE }}
47-
run: dotnet test tests/Auth0.AspNetCore.Authentication.Api.IntegrationTests/Auth0.AspNetCore.Authentication.Api.IntegrationTests.csproj
47+
run: dotnet test tests/Auth0.AspNetCore.Authentication.Api.IntegrationTests/Auth0.AspNetCore.Authentication.Api.IntegrationTests.csproj --collect:"XPlat Code coverage" --results-directory ./TestResults/ /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura
4848

49-
#TODO: Capture and Update CodeCov report later.
49+
- name: Update codecov report
50+
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # [email protected]
51+
with:
52+
token: ${{ secrets.CODECOV_TOKEN }}
53+
files: ./TestResults/**/coverage.cobertura.xml
54+
fail_ci_if_error: false
55+
verbose: true

0 commit comments

Comments
 (0)