Skip to content

Commit 513157c

Browse files
committed
ci: add test results and coverage reporting to PR comments
1 parent b0a25c8 commit 513157c

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: CI Builds
22
permissions:
33
contents: read
4+
pull-requests: write
45

56
on:
67
pull_request:
@@ -36,7 +37,18 @@ jobs:
3637
run: dotnet build --no-restore
3738

3839
- name: Test
39-
run: dotnet test --no-build
40+
run: dotnet test --no-build --verbosity normal --logger trx --collect:"XPlat Code Coverage"
41+
42+
- name: Generate test report
43+
uses: bibipkins/dotnet-test-reporter@v1.6.1
44+
if: ${{ always() && matrix.os == 'ubuntu-latest' }}
45+
with:
46+
github-token: ${{ secrets.GITHUB_TOKEN }}
47+
comment-title: "Test Results"
48+
results-path: tests/**/*.trx
49+
coverage-path: tests/**/*.cobertura.xml
50+
coverage-type: cobertura
51+
coverage-threshold: 70
4052

4153
- name: Publish
4254
run: dotnet publish src/SharpFM/SharpFM.csproj --runtime "${{ matrix.target }}" -c Debug

0 commit comments

Comments
 (0)