Skip to content

Commit 07d3d44

Browse files
🩹 [CI]: Add 'Needs' input to Get-TestResults workflow for job dependency management
1 parent 825f963 commit 07d3d44

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

‎.github/workflows/CI.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ jobs:
172172
uses: ./.github/workflows/Get-TestResults.yml
173173
secrets: inherit
174174
with:
175+
Needs: ${{ toJson(needs) }}
175176
Debug: ${{ inputs.Debug }}
176177
Prerelease: ${{ inputs.Prerelease }}
177178
Verbose: ${{ inputs.Verbose }}

‎.github/workflows/Get-TestResults.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ name: Get-TestResults
33
on:
44
workflow_call:
55
inputs:
6+
Needs:
7+
type: string
8+
description: The json objects representing the jobs that this job depends on.
9+
required: false
10+
default: ''
611
Debug:
712
type: boolean
813
description: Enable debug output.
@@ -37,6 +42,14 @@ jobs:
3742
name: Get-TestResults
3843
runs-on: ubuntu-latest
3944
steps:
45+
- name: Needs
46+
shell: pwsh
47+
env:
48+
Needs: ${{ inputs.Needs }}
49+
run: |
50+
$env:Needs
51+
$env:Needs | ConvertFrom-Json
52+
4053
- name: Get-TestResults
4154
uses: PSModule/Get-PesterTestResults@v1
4255
id: Get-TestResults

‎.github/workflows/Test-ModuleLocal.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ jobs:
106106
107107
- name: Test-ModuleLocal
108108
# uses: PSModule/Invoke-Pester@v4
109-
uses: PSModule/Invoke-Pester@prescript
109+
uses: PSModule/Invoke-Pester@v4
110110
continue-on-error: true
111111
env:
112112
TEST_APP_ENT_CLIENT_ID: ${{ secrets.TEST_APP_ENT_CLIENT_ID }}

‎.github/workflows/workflow.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ jobs:
177177
uses: ./.github/workflows/Get-TestResults.yml
178178
secrets: inherit
179179
with:
180+
Needs: ${{ toJson(needs) }}
180181
Debug: ${{ inputs.Debug }}
181182
Prerelease: ${{ inputs.Prerelease }}
182183
Verbose: ${{ inputs.Verbose }}

0 commit comments

Comments
 (0)