Skip to content

Commit ca705aa

Browse files
committed
Add GitHub CTRF test reporting
1 parent 2d340ab commit ca705aa

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

.github/workflows/pull-request.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,15 @@ jobs:
5454
path: artifacts/test
5555
compression-level: 9
5656
if: always()
57+
58+
- name: Publish Test Report
59+
uses: ctrf-io/github-test-reporter@v1
60+
with:
61+
report-path: './artifacts/test/*.ctrf'
62+
summary-report: true
63+
github-report: true
64+
pull-request: true
65+
update-comment: true
66+
env:
67+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
if: always()

.github/workflows/push-main.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,11 @@ jobs:
6161
path: artifacts/packages
6262
compression-level: 0
6363
if: always()
64+
65+
- name: Publish Test Report
66+
uses: ctrf-io/github-test-reporter@v1
67+
with:
68+
report-path: './artifacts/test/*.ctrf'
69+
summary-report: true
70+
github-report: true
71+
if: always()

tools/builder/targets/Test.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ public static Task OnExecute(BuildContext context)
3434
);
3535

3636

37-
return context.Exec(context.ConsoleRunner, $"{string.Join(" ", testDLLs)} -xml {Path.Join(context.TestOutputFolder, "results.xml")}");
37+
return context.Exec(context.ConsoleRunner, $"{string.Join(" ", testDLLs)} -ctrf {Path.Join(context.TestOutputFolder, "results.ctrf")}");
3838
}
3939
}

0 commit comments

Comments
 (0)