Action-Test - [ #] by @MariusStorhaug #173
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@v4 | |
- name: Action-Test | |
uses: ./ | |
id: action-test | |
with: | |
Path: src | |
Settings: SourceCode | |
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@v4 | |
- name: Action-Test | |
uses: ./ | |
id: action-test | |
with: | |
Path: src | |
Settings: Custom | |
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@v4 | |
- name: Action-Test | |
uses: ./ | |
continue-on-error: true | |
id: action-test | |
with: | |
Path: src | |
Settings: SourceCode | |
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@v4 | |
- name: Action-Test | |
uses: ./ | |
id: action-test | |
with: | |
Path: outputs/modules/PSModuleTest | |
Settings: Module | |
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 | |
- ActionTestOutputs | |
if: always() | |
runs-on: ubuntu-latest | |
env: | |
ActionTestSrcSourceCodeOutcome: ${{ needs.ActionTestSrcSourceCode.outputs.Outcome }} | |
ActionTestSrcSourceCodeConclusion: ${{ needs.ActionTestSrcSourceCode.outputs.Conclusion }} | |
ActionTestSrcCustomOutcome: ${{ needs.ActionTestSrcCustom.outputs.Outcome }} | |
ActionTestSrcCustomConclusion: ${{ needs.ActionTestSrcCustom.outputs.Conclusion }} | |
ActionTestSrcWithManifestOutcome: ${{ needs.ActionTestSrcWithManifest.outputs.Outcome }} | |
ActionTestSrcWithManifestConclusion: ${{ needs.ActionTestSrcWithManifest.outputs.Conclusion }} | |
ActionTestOutputsOutcome: ${{ needs.ActionTestOutputs.outputs.Outcome }} | |
ActionTestOutputsConclusion: ${{ needs.ActionTestOutputs.outputs.Conclusion }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Aggregated Status | |
uses: PSModule/Github-Script@v1 | |
with: | |
Script: | | |
# Aggregated Status | |
tests/Get-AggregatedStatus.ps1 |