Action-Test - [ #] by @MariusStorhaug #328
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@v6 | |
| 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@v6 | |
| 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@v6 | |
| 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@v6 | |
| 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 }}" | |
| 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@v6 | |
| 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 | |
| - 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@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Aggregated Status | |
| uses: PSModule/Github-Script@v1 | |
| with: | |
| Script: tests/Get-AggregatedStatus.ps1 |