Skip to content

Commit 89826a4

Browse files
committed
Use separate CI workflow to overcome issue with Dorny
1 parent cae6a11 commit 89826a4

File tree

3 files changed

+39
-17
lines changed

3 files changed

+39
-17
lines changed

.github/workflows/test-report.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: 'Test Report'
2+
3+
# See Dorny instructions for why we need a separate yaml for creating a test report
4+
# for public repositories that accept forks:
5+
# https://github.com/dorny/test-reporter#recommended-setup-for-public-repositories
6+
7+
on:
8+
workflow_run:
9+
workflows: ['ci-test'] # runs after CI workflow
10+
types:
11+
- completed
12+
jobs:
13+
test-report-release:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: dorny/test-reporter@v1
17+
with:
18+
artifact: test-results-release # artifact name
19+
name: Report release tests # Name of the check run which will be created
20+
path: '**/*.trx' # Path to test results (inside artifact .zip)
21+
reporter: dotnet-trx # Format of test results
22+
23+
test-report-debug:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: dorny/test-reporter@v1
27+
with:
28+
artifact: test-results-debug # artifact name
29+
name: Report debug tests # Name of the check run which will be created
30+
path: '**/*.trx' # Path to test results (inside artifact .zip)
31+
reporter: dotnet-trx # Format of test results

.github/workflows/test.yaml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,8 @@ name: ci-test
22

33
on: [pull_request]
44

5-
permissions:
6-
id-token: write
7-
contents: read
8-
checks: write
9-
105
jobs:
116
test-release:
12-
permissions: write-all
137
name: Test Release Build
148
runs-on: windows-latest
159
steps:
@@ -24,17 +18,15 @@ jobs:
2418
# build it, test it
2519
- name: Run dotnet test - release
2620
run: ./build.cmd ci -release
27-
- name: Publish test results - release
28-
uses: dorny/test-reporter@v1
29-
if: always()
21+
- uses: actions/upload-artifact@v2 # upload test results
22+
if: success() || failure() # run this step even if previous step failed
3023
with:
31-
name: Report release tests
24+
name: test-results-release
3225
# this path glob pattern requires forward slashes!
3326
path: ./src/FSharp.Control.TaskSeq.Test/TestResults/test-results-release.trx
34-
reporter: dotnet-trx
27+
3528

3629
test-debug:
37-
permissions: write-all
3830
name: Test Debug Build
3931
runs-on: windows-latest
4032
steps:
@@ -49,11 +41,9 @@ jobs:
4941
# build it, test it
5042
- name: Run dotnet test - debug
5143
run: ./build.cmd ci -debug
52-
- name: Publish test results - debug
53-
uses: dorny/test-reporter@v1
54-
if: always()
44+
- uses: actions/upload-artifact@v2 # upload test results
45+
if: success() || failure() # run this step even if previous step failed
5546
with:
56-
name: Report debug tests
47+
name: test-results-debug
5748
# this path glob pattern requires forward slashes!
5849
path: ./src/FSharp.Control.TaskSeq.Test/TestResults/test-results-debug.trx
59-
reporter: dotnet-trx

src/FSharp.Control.TaskSeq.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{
2121
..\.github\dependabot.yml = ..\.github\dependabot.yml
2222
..\.github\workflows\main.yaml = ..\.github\workflows\main.yaml
2323
..\.github\workflows\publish.yaml = ..\.github\workflows\publish.yaml
24+
..\.github\workflows\test-report.yaml = ..\.github\workflows\test-report.yaml
2425
..\.github\workflows\test.yaml = ..\.github\workflows\test.yaml
2526
EndProjectSection
2627
EndProject

0 commit comments

Comments
 (0)