From 27e22c6be140bf69e8e78cf2e891473e257d1b1e Mon Sep 17 00:00:00 2001 From: Gerardo Grignoli Date: Tue, 13 Sep 2022 19:50:48 -0300 Subject: [PATCH] Github actions: switch to dorny/test-reporter --- .github/workflows/ci.yml | 28 ++++++++++++---------------- build/02-test.ps1 | 2 +- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad5b9ada..341bb1e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/build/02-test.ps1 b/build/02-test.ps1 index 34dba6ac..dce2422c 100644 --- a/build/02-test.ps1 +++ b/build/02-test.ps1 @@ -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