Action-Test - [Honor analyzer report-path inputs #42] by @MariusStorhaug #636
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Action-Test | |
| run-name: "Action-Test - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}" | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| jobs: | |
| ActionTestSrcSourceCode: | |
| name: Action-Test - [Src-SourceCode] | |
| runs-on: ubuntu-latest | |
| outputs: | |
| Outcome: ${{ steps.action-test.outcome }} | |
| Conclusion: ${{ steps.action-test.conclusion }} | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Action-Test | |
| uses: ./ | |
| id: action-test | |
| with: | |
| Path: src | |
| WorkingDirectory: tests/srcTestRepo | |
| - name: Status | |
| shell: pwsh | |
| run: | | |
| Write-Host "Outcome: ${{ steps.action-test.outcome }}" | |
| Write-Host "Conclusion: ${{ steps.action-test.conclusion }}" | |
| ActionTestSrcCustom: | |
| name: Action-Test - [Src-Custom] | |
| runs-on: ubuntu-latest | |
| outputs: | |
| Outcome: ${{ steps.action-test.outcome }} | |
| Conclusion: ${{ steps.action-test.conclusion }} | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Action-Test | |
| uses: ./ | |
| id: action-test | |
| with: | |
| Path: src | |
| SettingsFilePath: tests/Custom.Settings.psd1 | |
| WorkingDirectory: tests/srcTestRepo | |
| - name: Status | |
| shell: pwsh | |
| run: | | |
| Write-Host "Outcome: ${{ steps.action-test.outcome }}" | |
| Write-Host "Conclusion: ${{ steps.action-test.conclusion }}" | |
| ActionTestSrcWithManifest: | |
| name: Action-Test - [Src-WithManifest] | |
| runs-on: ubuntu-latest | |
| outputs: | |
| Outcome: ${{ steps.action-test.outcome }} | |
| Conclusion: ${{ steps.action-test.conclusion }} | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Action-Test | |
| uses: ./ | |
| continue-on-error: true | |
| id: action-test | |
| with: | |
| Path: src | |
| SettingsFilePath: tests/SourceCode.Settings.psd1 | |
| WorkingDirectory: tests/srcWithManifestTestRepo | |
| - name: Status | |
| shell: pwsh | |
| run: | | |
| Write-Host "Outcome: ${{ steps.action-test.outcome }}" | |
| Write-Host "Conclusion: ${{ steps.action-test.conclusion }}" | |
| ActionTestSrcWithManifestDefault: | |
| name: Action-Test - [Src-WithManifest-Default] | |
| runs-on: ubuntu-latest | |
| outputs: | |
| Outcome: ${{ steps.action-test.outcome }} | |
| Conclusion: ${{ steps.action-test.conclusion }} | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Action-Test | |
| uses: ./ | |
| continue-on-error: true | |
| id: action-test | |
| with: | |
| Path: src | |
| WorkingDirectory: tests/srcWithManifestTestRepo | |
| - name: Status | |
| shell: pwsh | |
| run: | | |
| Write-Host "Outcome: ${{ steps.action-test.outcome }}" | |
| Write-Host "Conclusion: ${{ steps.action-test.conclusion }}" | |
| ActionTestReportPaths: | |
| name: Action-Test - [Report Paths] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Action-Test | |
| uses: ./ | |
| id: action-test | |
| with: | |
| Path: src | |
| WorkingDirectory: tests/srcTestRepo | |
| TestResult_Enabled: true | |
| TestResult_OutputFormat: NUnitXml | |
| TestResult_OutputPath: .PSModule/TestResult/PSScriptAnalyzer-TestResult-Report.xml | |
| CodeCoverage_Enabled: true | |
| CodeCoverage_OutputFormat: JaCoCo | |
| CodeCoverage_OutputPath: .PSModule/CodeCoverage/PSScriptAnalyzer-CodeCoverage-Report.xml | |
| CodeCoverage_Path: ../../src/tests/PSScriptAnalyzer/PSScriptAnalyzer.Tests.ps1 | |
| - name: Assert report paths | |
| shell: pwsh | |
| run: | | |
| tests/Assert-ReportPaths.ps1 ` | |
| -WorkingDirectory tests/srcTestRepo ` | |
| -TestResultPath .PSModule/TestResult/PSScriptAnalyzer-TestResult-Report.xml ` | |
| -CodeCoveragePath .PSModule/CodeCoverage/PSScriptAnalyzer-CodeCoverage-Report.xml | |
| ActionTestDefaultReportPaths: | |
| name: Action-Test - [Default Report Paths] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Action-Test | |
| uses: ./ | |
| id: action-test | |
| with: | |
| Path: src | |
| WorkingDirectory: tests/srcTestRepo | |
| TestResult_Enabled: true | |
| TestResult_OutputFormat: NUnitXml | |
| CodeCoverage_Enabled: true | |
| CodeCoverage_OutputFormat: JaCoCo | |
| CodeCoverage_Path: ../../src/tests/PSScriptAnalyzer/PSScriptAnalyzer.Tests.ps1 | |
| - name: Assert report paths | |
| shell: pwsh | |
| run: | | |
| tests/Assert-ReportPaths.ps1 ` | |
| -WorkingDirectory tests/srcTestRepo ` | |
| -TestResultPath .PSModule/TestResult/PSScriptAnalyzer-TestResult-Report.xml ` | |
| -CodeCoveragePath .PSModule/CodeCoverage/PSScriptAnalyzer-CodeCoverage-Report.xml | |
| ActionTestOutputs: | |
| name: Action-Test - [outputs] | |
| runs-on: ubuntu-latest | |
| outputs: | |
| Outcome: ${{ steps.action-test.outcome }} | |
| Conclusion: ${{ steps.action-test.conclusion }} | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Action-Test | |
| uses: ./ | |
| id: action-test | |
| with: | |
| Path: outputs/modules/PSModuleTest | |
| WorkingDirectory: tests/outputTestRepo | |
| - name: Status | |
| shell: pwsh | |
| run: | | |
| Write-Host "Outcome: ${{ steps.action-test.outcome }}" | |
| Write-Host "Conclusion: ${{ steps.action-test.conclusion }}" | |
| CatchJob: | |
| name: Aggregate Status | |
| needs: | |
| - ActionTestSrcSourceCode | |
| - ActionTestSrcCustom | |
| - ActionTestSrcWithManifest | |
| - ActionTestSrcWithManifestDefault | |
| - ActionTestReportPaths | |
| - ActionTestDefaultReportPaths | |
| - ActionTestOutputs | |
| if: always() | |
| runs-on: ubuntu-latest | |
| env: | |
| SourceCodeOutcome: ${{ needs.ActionTestSrcSourceCode.outputs.Outcome }} | |
| SourceCodeConclusion: ${{ needs.ActionTestSrcSourceCode.outputs.Conclusion }} | |
| CustomOutcome: ${{ needs.ActionTestSrcCustom.outputs.Outcome }} | |
| CustomConclusion: ${{ needs.ActionTestSrcCustom.outputs.Conclusion }} | |
| WithManifestOutcome: ${{ needs.ActionTestSrcWithManifest.outputs.Outcome }} | |
| WithManifestConclusion: ${{ needs.ActionTestSrcWithManifest.outputs.Conclusion }} | |
| WithManifestDefaultOutcome: ${{ needs.ActionTestSrcWithManifestDefault.outputs.Outcome }} | |
| WithManifestDefaultConclusion: ${{ needs.ActionTestSrcWithManifestDefault.outputs.Conclusion }} | |
| OutputsOutcome: ${{ needs.ActionTestOutputs.outputs.Outcome }} | |
| OutputsConclusion: ${{ needs.ActionTestOutputs.outputs.Conclusion }} | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Aggregated Status | |
| uses: PSModule/GitHub-Script@8083ec1f733f00357ee4d0db0c6056686e483bc0 # v1.9.0 | |
| with: | |
| Script: tests/Get-AggregatedStatus.ps1 |