Skip to content

Commit c7b4131

Browse files
committed
Changed test publisher in build.yml
1 parent 6052fc9 commit c7b4131

1 file changed

Lines changed: 11 additions & 16 deletions

File tree

.github/workflows/build.yml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ on:
99
pull_request:
1010
branches: [ "main" ]
1111

12+
permissions:
13+
contents: read
14+
issues: read
15+
checks: write
16+
pull-requests: write
17+
1218
jobs:
1319
build:
1420

@@ -25,22 +31,11 @@ jobs:
2531
- name: Build
2632
run: dotnet build Source/Dove.Blog.slnx --no-restore
2733
- name: Test
28-
run: dotnet test Source/Dove.Blog.slnx --no-build --logger trx --results-directory "TestResults"
29-
- name: Upload test results
30-
uses: actions/upload-artifact@v4
31-
if: ${{ always() }}
32-
with:
33-
name: dotnet-results
34-
path: TestResults
35-
- name: Download test results
36-
uses: actions/download-artifact@v4
37-
with:
38-
name: dotnet-results
34+
run: dotnet test Source/Dove.Blog.slnx --no-build --logger:"xunit;LogFilePath=test-results.xml"
3935
- name: Publish test results
40-
uses: dorny/test-reporter@v2
36+
uses: EnricoMi/publish-unit-test-result-action@v2
37+
if: always()
4138
with:
42-
name: dotnet-test
43-
artifact: dotnet-results
44-
path: '*.trx'
45-
reporter: dotnet-trx
39+
files: |
40+
./Dove.Blog.Tests/test-results.xml
4641

0 commit comments

Comments
 (0)