Skip to content

Commit 137a622

Browse files
🩹 [CI]: Integrate Get-TestSuites job into Test-SourceCode and Test-Module workflows for improved test suite management
1 parent 2919222 commit 137a622

File tree

2 files changed

+19
-32
lines changed

2 files changed

+19
-32
lines changed

‎.github/workflows/CI.yml‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,16 +127,11 @@ jobs:
127127
name: Test-Module
128128
needs:
129129
- Build-Module
130+
- Get-TestSuites
130131
strategy:
131132
fail-fast: false
132133
matrix:
133-
include:
134-
- OSName: Linux
135-
RunsOn: ubuntu-latest
136-
- OSName: macOS
137-
RunsOn: macos-latest
138-
- OSName: Windows
139-
RunsOn: windows-latest
134+
include: ${{ fromJson(needs.Get-TestSuites.outputs.SourceCodeTestSuites) }}
140135
uses: ./.github/workflows/Test-Module.yml
141136
secrets: inherit
142137
with:

‎.github/workflows/workflow.yml‎

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -74,18 +74,25 @@ permissions:
7474
statuses: write # to update the status of the workflow from linter
7575

7676
jobs:
77+
Get-TestSuites:
78+
name: Get-TestSuites
79+
uses: ./.github/workflows/Get-TestSuites.yml
80+
with:
81+
SkipTests: ${{ inputs.SkipTests }}
82+
Debug: ${{ inputs.Debug }}
83+
Prerelease: ${{ inputs.Prerelease }}
84+
Verbose: ${{ inputs.Verbose }}
85+
Version: ${{ inputs.Version }}
86+
WorkingDirectory: ${{ inputs.WorkingDirectory }}
87+
7788
Test-SourceCode:
7889
name: Test-SourceCode
90+
needs:
91+
- Get-TestSuites
7992
strategy:
8093
fail-fast: false
8194
matrix:
82-
include:
83-
- OSName: Linux
84-
RunsOn: ubuntu-latest
85-
- OSName: macOS
86-
RunsOn: macos-latest
87-
- OSName: Windows
88-
RunsOn: windows-latest
95+
include: ${{ fromJson(needs.Get-TestSuites.outputs.SourceCodeTestSuites) }}
8996
uses: ./.github/workflows/Test-SourceCode.yml
9097
with:
9198
RunsOn: ${{ matrix.RunsOn }}
@@ -120,31 +127,16 @@ jobs:
120127
Version: ${{ inputs.Version }}
121128
WorkingDirectory: ${{ inputs.WorkingDirectory }}
122129

123-
Get-TestSuites:
124-
name: Get-TestSuites
125-
uses: ./.github/workflows/Get-TestSuites.yml
126-
with:
127-
Debug: ${{ inputs.Debug }}
128-
Prerelease: ${{ inputs.Prerelease }}
129-
Verbose: ${{ inputs.Verbose }}
130-
Version: ${{ inputs.Version }}
131-
WorkingDirectory: ${{ inputs.WorkingDirectory }}
132-
133130
Test-Module:
134131
if: ${{ needs.Build-Module.result == 'success' && !cancelled() }}
135132
name: Test-Module
136133
needs:
137134
- Build-Module
135+
- Get-TestSuites
138136
strategy:
139137
fail-fast: false
140138
matrix:
141-
include:
142-
- OSName: Linux
143-
RunsOn: ubuntu-latest
144-
- OSName: macOS
145-
RunsOn: macos-latest
146-
- OSName: Windows
147-
RunsOn: windows-latest
139+
include: ${{ fromJson(needs.Get-TestSuites.outputs.SourceCodeTestSuites) }}
148140
uses: ./.github/workflows/Test-Module.yml
149141
secrets: inherit
150142
with:
@@ -167,7 +159,7 @@ jobs:
167159
strategy:
168160
fail-fast: false
169161
matrix:
170-
include: ${{ fromJson(needs.Get-TestSuites.outputs.TestSuites) }}
162+
include: ${{ fromJson(needs.Get-TestSuites.outputs.ModuleTestSuites) }}
171163
uses: ./.github/workflows/Test-ModuleLocal.yml
172164
secrets: inherit
173165
with:

0 commit comments

Comments
 (0)