Skip to content

Commit 446940d

Browse files
🌟 [Major]: Consolidate Action-Test workflows into a single file
1 parent aaf62a2 commit 446940d

File tree

6 files changed

+54
-103
lines changed

6 files changed

+54
-103
lines changed

.github/workflows/Action-Test-Src-Default-Custom.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/Action-Test-Src-Default.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/Action-Test-Src-WithManifest.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/Action-Test-outputs.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/Action-Test.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Action-Test
2+
3+
run-name: "Action-Test - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"
4+
5+
on:
6+
workflow_dispatch:
7+
pull_request:
8+
schedule:
9+
- cron: '0 0 * * *'
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
permissions:
16+
contents: read
17+
pull-requests: read
18+
19+
jobs:
20+
ActionTestSrcSourceCode:
21+
name: Action-Test - [Src-SourceCode]
22+
uses: ./.github/workflows/ActionTestWorkflow.yml
23+
with:
24+
TestType: Src-SourceCode
25+
Path: tests/srcTestRepo/src
26+
Settings: SourceCode
27+
28+
ActionTestSrcCustom:
29+
name: Action-Test - [Src-Custom]
30+
uses: ./.github/workflows/ActionTestWorkflow.yml
31+
with:
32+
TestType: Src-Custom
33+
Path: tests/srcTestRepo/src
34+
Settings: Custom
35+
SettingsFilePath: tests/srcTestRepo/tests/Custom.Settings.psd1
36+
37+
ActionTestSrcWithManifest:
38+
name: Action-Test - [Src-WithManifest]
39+
uses: ./.github/workflows/ActionTestWorkflow.yml
40+
with:
41+
TestType: Src-WithManifest
42+
Path: tests/srcWithManifestTestRepo/src
43+
Settings: SourceCode
44+
45+
ActionTestOutputs:
46+
name: Action-Test - [outputs]
47+
uses: ./.github/workflows/ActionTestWorkflow.yml
48+
with:
49+
TestType: outputs
50+
Path: tests/outputTestRepo/outputs/modules/PSModuleTest
51+
Settings: Module

.github/workflows/ActionTestWorkflow.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,12 @@ jobs:
2222
fail-fast: false
2323
matrix:
2424
os: [ubuntu-latest, macos-latest, windows-latest]
25-
name: Action-Test [outputs] - [${{ matrix.os }}]
25+
name: '${{ inputs.Path }} - ${{ inputs.TestType }} [${{ matrix.os }}]'
2626
runs-on: ${{ matrix.os }}
2727
steps:
2828
- name: Checkout repo
2929
uses: actions/checkout@v4
3030

31-
- name: Initialize environment
32-
uses: PSModule/Initialize-PSModule@main
33-
3431
- name: Action-Test
3532
uses: ./
3633
id: action-test
@@ -41,10 +38,6 @@ jobs:
4138

4239
- name: Status
4340
shell: pwsh
44-
env:
45-
PASSED: ${{ steps.action-test.outputs.passed }}
4641
run: |
47-
Write-Host "Passed: [$env:PASSED]"
48-
if ($env:PASSED -ne 'true') {
49-
exit 1
50-
}
42+
Write-Host "Outcome: ${{ steps.action-test.outcome }}"
43+
Write-Host "Conclusion: ${{ steps.action-test.conclusion }}"

0 commit comments

Comments
 (0)