Skip to content

Commit

Permalink
Github actions: switch to dorny/test-reporter
Browse files Browse the repository at this point in the history
  • Loading branch information
gerardog committed Sep 13, 2022
1 parent 1c5e0d1 commit 27e22c6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
28 changes: 12 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,33 +35,29 @@ jobs:
id: tests
run: ./build/02-test.ps1
- name: Test Report DotNet
uses: dorny/test-reporter@v1
uses: dorny/test-reporter@v1.5.0
if: success() || failure()
with:
name: TestsResults (dotnet)
path: "**/TestResults*.trx"
reporter: dotnet-trx
fail-on-error: false
fail-on-error: true
- name: Test Report PowerShell v5
uses: zyborg/pester-tests-report@v1.5.0 # https://github.com/zyborg/pester-tests-report#inputs
uses: dorny/test-reporter@v1.5.0
if: success() || failure()
with:
test_results_path: ./testResults_PS5.xml
report_name: TestResults PowerShell v5.x
report_title: PowerShell v5 Tests
github_token: ${{ secrets.GITHUB_TOKEN }}

name: TestsResults (PowerShell v5)
path: ./testResults_PS5.xml
reporter: jest-junit
fail-on-error: true
- name: Test Report PowerShell v7
uses: zyborg/pester-tests-report@v1.5.0 # https://github.com/zyborg/pester-tests-report#inputs
uses: dorny/test-reporter@v1.5.0
if: success() || failure()
with:
test_results_path: ./testResults_PS7.xml
report_name: TestResults PowerShell Core (v7.x)
report_title: PowerShell v7 Tests
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Fail on error
if: ${{ steps.tests.conclusion == 'failure' }}
run: exit 1
name: TestsResults (PowerShell v7)
path: ./testResults_PS7.xml
reporter: jest-junit
fail-on-error: true
build:
name: Build
runs-on: windows-latest
Expand Down
2 changes: 1 addition & 1 deletion build/02-test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ $script = {
$configuration.Run.Path = "src"
$configuration.TestResult.Enabled = $true
$configuration.TestResult.OutputPath = "TestResults_PS$($PSVersionTable.PSVersion.Major).xml"
$configuration.TestResult.OutputFormat = "NUnitXml"
$configuration.TestResult.OutputFormat = "JUnitXml"
# $configuration.Should.ErrorAction = 'Continue'
# $configuration.CodeCoverage.Enabled = $true

Expand Down

0 comments on commit 27e22c6

Please sign in to comment.