Skip to content

Commit

Permalink
update github action (dotnet-ubuntu.yml) file to generate code test c…
Browse files Browse the repository at this point in the history
…overage reports and upload that to codecov.io
  • Loading branch information
bezzad committed Sep 20, 2024
1 parent 6ddbfe2 commit c735ac2
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/dotnet-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,20 @@ jobs:
with:
dotnet-version: 8.0.x

- name: Restore dependencies
run: dotnet restore ./src

- name: Build solution
run: dotnet build -c Release ./src --verbosity minimal

- name: Run tests
run: dotnet test -c Release ./src --verbosity normal --no-build --no-restore
- name: Run tests and collect coverage
run: dotnet test -c Release ./src --verbosity normal --no-build --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CoverletOutput=./TestResults/

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN }}
files: ./TestResults/coverage.cobertura.xml
flags: unit
name: codecov-umbrella
fail_ci_if_error: true # optional (default: false)

0 comments on commit c735ac2

Please sign in to comment.