Skip to content

Commit

Permalink
Split test report jobs into separate workflows (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
FantasyTeddy committed Feb 15, 2024
1 parent a0abe25 commit 13319df
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 29 deletions.
31 changes: 2 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ on:
description: 'Filter for Specs execution (e.g. Category=basicExecution)'
required: false


permissions:
checks: write

env:
SPECS_FILTER: "" # use for testing CI: "&Category=basicExecution"

Expand Down Expand Up @@ -163,14 +159,7 @@ jobs:
with:
name: specs-xunit-results
path: "**/specs-xunit-results.trx"
- name: Test Report
uses: dorny/test-reporter@v1
if: github.event_name != 'pull_request' && (success() || failure())
with:
name: xUnit Specs
path: "**/specs-xunit-results.trx"
reporter: dotnet-trx


specs-nunit:
runs-on: ubuntu-latest
needs: build
Expand Down Expand Up @@ -198,15 +187,7 @@ jobs:
with:
name: specs-nunit-results
path: "**/specs-nunit-results.trx"
- name: Test Report
uses: dorny/test-reporter@v1
if: github.event_name != 'pull_request' && (success() || failure())
with:
name: NUnit Specs
path: "**/specs-nunit-results.trx"
reporter: dotnet-trx



specs-mstest:
runs-on: ubuntu-latest
needs: build
Expand Down Expand Up @@ -234,11 +215,3 @@ jobs:
with:
name: specs-mstest-results
path: "**/specs-mstest-results.trx"
- name: Test Report
uses: dorny/test-reporter@v1
if: github.event_name != 'pull_request' && (success() || failure())
with:
name: MsTest Specs
path: "**/specs-mstest-results.trx"
reporter: dotnet-trx

46 changes: 46 additions & 0 deletions .github/workflows/test-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Test Report

on:
workflow_run:
workflows: ["CI"]
types:
- completed

permissions:
contents: read
actions: read
checks: write

jobs:
xunit-report:
runs-on: ubuntu-latest
steps:
- name: xUnit Test Report
uses: dorny/test-reporter@v1
with:
artifact: specs-xunit-results
name: xUnit Specs
path: "**/specs-xunit-results.trx"
reporter: dotnet-trx

nunit-report:
runs-on: ubuntu-latest
steps:
- name: NUnit Test Report
uses: dorny/test-reporter@v1
with:
artifact: specs-nunit-results
name: NUnit Specs
path: "**/specs-nunit-results.trx"
reporter: dotnet-trx

mstest-report:
runs-on: ubuntu-latest
steps:
- name: MSTest Test Report
uses: dorny/test-reporter@v1
with:
artifact: specs-mstest-results
name: MSTest Specs
path: "**/specs-mstest-results.trx"
reporter: dotnet-trx

0 comments on commit 13319df

Please sign in to comment.