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 diff --git a/src/gsudo.Wrappers.Tests/gsudo.Tests.ps1 b/src/gsudo.Wrappers.Tests/gsudo.Tests.ps1 index d35bc281..5c6d80fe 100644 --- a/src/gsudo.Wrappers.Tests/gsudo.Tests.ps1 +++ b/src/gsudo.Wrappers.Tests/gsudo.Tests.ps1 @@ -12,7 +12,7 @@ Describe "PS Gsudo (v$($PSVersionTable.PSVersion.ToString()))" { It "It serializes return values as string." { $result = gsudo "1+1" - $result | Should -Be "2" + $result | Should -Be "20" $result -is [System.String] | Should -Be $true }