Skip to content

Commit

Permalink
test: Follow recommended setup for public repositories by Test Report…
Browse files Browse the repository at this point in the history
…er (#2288)

* Create publish-ci-test-report.yml

* Update ci-code.yml
  • Loading branch information
tomkerkhove authored May 8, 2023
1 parent 7271cd3 commit f4b77ab
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/ci-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,13 @@ jobs:
- name: Run Unit Tests
run: dotnet test src/Promitor.Tests.Unit/Promitor.Tests.Unit.csproj --logger "trx;LogFileName=test-results.trx"

# Provide Unit Test Results
- name: Report Unit Test Results
uses: dorny/test-reporter@v1
# Publish Unit Test Results
- name: Upload Test Results
uses: actions/upload-artifact@v2
if: success() || failure()
with:
name: .NET Unit Tests
name: test-results
path: src/**/test-results.trx
reporter: dotnet-trx
code_quality:
runs-on: ubuntu-latest # or macos-latest, windows-latest
name: Code Quality (R#)
Expand All @@ -67,4 +66,4 @@ jobs:
uses: muno92/resharper_inspectcode@1.6.11
with:
solutionPath: src/Promitor.sln
minimumSeverity: warning
minimumSeverity: warning
24 changes: 24 additions & 0 deletions .github/workflows/publish-ci-test-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 'Test Report'
on:
workflow_run:
workflows: ['CI - Code']
types:
- completed

permissions:
statuses: write
checks: write
contents: write
pull-requests: write
actions: write

jobs:
report:
runs-on: ubuntu-latest
steps:
- uses: dorny/test-reporter@v1
with:
artifact: test-results
name: .NET Unit Tests
path: '*.trx'
reporter: dotnet-trx

0 comments on commit f4b77ab

Please sign in to comment.