Skip to content

Commit f6fef54

Browse files
Move BeforeAll/AfterAll jobs into Test-ModuleLocal workflow and remove detection logic
Co-authored-by: MariusStorhaug <[email protected]>
1 parent 87ac2eb commit f6fef54

File tree

6 files changed

+188
-414
lines changed

6 files changed

+188
-414
lines changed

.github/workflows/AfterAll-ModuleLocal.yml

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

.github/workflows/BeforeAll-ModuleLocal.yml

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

.github/workflows/CI.yml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -176,27 +176,11 @@ jobs:
176176
Version: ${{ inputs.Version }}
177177
WorkingDirectory: ${{ inputs.WorkingDirectory }}
178178

179-
BeforeAll-ModuleLocal:
180-
if: ${{ needs.Build-Module.result == 'success' && !cancelled() && needs.Get-Settings.outputs.ModuleTestSuites != '[]' }}
181-
needs:
182-
- Build-Module
183-
- Get-Settings
184-
uses: ./.github/workflows/BeforeAll-ModuleLocal.yml
185-
secrets: inherit
186-
with:
187-
Name: ${{ fromJson(needs.Get-Settings.outputs.Settings).Name }}
188-
Debug: ${{ inputs.Debug }}
189-
Prerelease: ${{ inputs.Prerelease }}
190-
Verbose: ${{ inputs.Verbose }}
191-
Version: ${{ inputs.Version }}
192-
WorkingDirectory: ${{ inputs.WorkingDirectory }}
193-
194179
Test-ModuleLocal:
195180
if: ${{ needs.Build-Module.result == 'success' && !cancelled() && needs.Get-Settings.outputs.ModuleTestSuites != '[]' }}
196181
needs:
197182
- Build-Module
198183
- Get-Settings
199-
- BeforeAll-ModuleLocal
200184
strategy:
201185
fail-fast: false
202186
matrix:
@@ -215,21 +199,6 @@ jobs:
215199
Version: ${{ inputs.Version }}
216200
WorkingDirectory: ${{ inputs.WorkingDirectory }}
217201

218-
AfterAll-ModuleLocal:
219-
if: ${{ always() && !cancelled() && needs.Get-Settings.outputs.ModuleTestSuites != '[]' }}
220-
needs:
221-
- Get-Settings
222-
- Test-ModuleLocal
223-
uses: ./.github/workflows/AfterAll-ModuleLocal.yml
224-
secrets: inherit
225-
with:
226-
Name: ${{ fromJson(needs.Get-Settings.outputs.Settings).Name }}
227-
Debug: ${{ inputs.Debug }}
228-
Prerelease: ${{ inputs.Prerelease }}
229-
Verbose: ${{ inputs.Verbose }}
230-
Version: ${{ inputs.Version }}
231-
WorkingDirectory: ${{ inputs.WorkingDirectory }}
232-
233202
Get-TestResults:
234203
if: needs.Get-Settings.result == 'success' && !fromJson(needs.Get-Settings.outputs.Settings).Test.TestResults.Skip && (needs.Get-Settings.outputs.SourceCodeTestSuites != '[]' || needs.Get-Settings.outputs.PSModuleTestSuites != '[]' || needs.Get-Settings.outputs.ModuleTestSuites != '[]') && (always() && !cancelled())
235204
needs:
@@ -238,7 +207,6 @@ jobs:
238207
- Lint-SourceCode
239208
- Test-Module
240209
- Test-ModuleLocal
241-
- AfterAll-ModuleLocal
242210
uses: ./.github/workflows/Get-TestResults.yml
243211
secrets: inherit
244212
with:
@@ -256,7 +224,6 @@ jobs:
256224
- Get-Settings
257225
- Test-Module
258226
- Test-ModuleLocal
259-
- AfterAll-ModuleLocal
260227
uses: ./.github/workflows/Get-CodeCoverage.yml
261228
secrets: inherit
262229
with:

0 commit comments

Comments
 (0)