File tree Expand file tree Collapse file tree 3 files changed +44
-16
lines changed Expand file tree Collapse file tree 3 files changed +44
-16
lines changed Original file line number Diff line number Diff line change @@ -141,14 +141,42 @@ jobs:
141
141
Verbose : ${{ inputs.Verbose }}
142
142
Version : ${{ inputs.Version }}
143
143
144
- Gather-Tests :
145
- if : ${{ needs.Build-Module.result == 'success' && !cancelled() }}
146
- needs :
147
- - Build-Module
148
- uses : ./.github/workflows/Gather-Tests.yml
144
+ Get-TestSuites :
145
+ uses : ./.github/workflows/Get-TestSuites.yml
149
146
with :
150
147
Path : ${{ inputs.Path }}
151
148
149
+ TestModuleLocal :
150
+ needs :
151
+ - Get-TestSuites
152
+ strategy :
153
+ matrix : ${{ fromJson(needs.Get-TestSuites.outputs.TestSuites) }}
154
+ runs-on : ${{ matrix.OS }}
155
+ steps :
156
+ - name : Test
157
+ shell : pwsh
158
+ run : |
159
+ $suite = '${{ matrix.Path }}'
160
+ if ($IsLinux) {
161
+ throw "Linux is not supported"
162
+ }
163
+ Write-Host "Running test suite: $suite"
164
+
165
+ Status :
166
+ name : Status
167
+ runs-on : ubuntu-latest
168
+ needs :
169
+ - TestModule
170
+ - TestModuleLocal
171
+ steps :
172
+ - name : Status
173
+ shell : pwsh
174
+ run : |
175
+ [pscustomobject]@{
176
+ TestModule = '${{ needs.TestModule.result }}'
177
+ TestModuleLocal = '${{ needs.TestModuleLocal.result }}'
178
+ }
179
+
152
180
# # This is necessary as there is no way to get output from a matrix job
153
181
# TestModule-pwsh-ubuntu-latest:
154
182
# name: Test module (pwsh, ubuntu-latest)
Original file line number Diff line number Diff line change 1
- name : Gather-Tests
1
+ name : Get-TestSuites
2
2
3
3
on :
4
4
workflow_call :
31
31
outputs :
32
32
TestSuites :
33
33
description : The test suites to run.
34
- value : ${{ jobs.Gather-Tests .outputs.TestSuites }}
34
+ value : ${{ jobs.Get-TestSuites .outputs.TestSuites }}
35
35
36
36
permissions :
37
37
contents : read # to checkout the repo
38
38
39
39
jobs :
40
- Gather-Tests :
41
- name : Gather-Tests
40
+ Get-TestSuites :
41
+ name : Get-TestSuites
42
42
runs-on : ubuntu-latest
43
43
outputs :
44
- TestSuites : ${{ fromJson(steps.Gather-Tests .outputs.result).TestSuites }}
44
+ TestSuites : ${{ fromJson(steps.Get-TestSuites .outputs.result).TestSuites }}
45
45
steps :
46
46
- name : Checkout Code
47
47
uses : actions/checkout@v4
48
48
49
- - name : Gather-Tests
49
+ - name : Get-TestSuites
50
50
uses : PSModule/GitHub-Script@v1
51
- id : Gather-Tests
51
+ id : Get-TestSuites
52
52
with :
53
53
ShowOutput : true
54
54
WorkingDirectory : ${{ inputs.Path }}
Original file line number Diff line number Diff line change @@ -148,16 +148,16 @@ jobs:
148
148
Verbose : ${{ inputs.Verbose }}
149
149
Version : ${{ inputs.Version }}
150
150
151
- Gather -TestSuites :
152
- uses : ./.github/workflows/Gather-Tests .yml
151
+ Get -TestSuites :
152
+ uses : ./.github/workflows/Get-TestSuites .yml
153
153
with :
154
154
Path : ${{ inputs.Path }}
155
155
156
156
TestModuleLocal :
157
157
needs :
158
- - Gather -TestSuites
158
+ - Get -TestSuites
159
159
strategy :
160
- matrix : ${{ needs.Gather -TestSuites.outputs.TestSuites }}
160
+ matrix : ${{ fromJson( needs.Get -TestSuites.outputs.TestSuites) }}
161
161
runs-on : ${{ matrix.OS }}
162
162
steps :
163
163
- name : Test
You can’t perform that action at this time.
0 commit comments