Skip to content

Commit 752f987

Browse files
authored
Add LivingDoc reporting to the test results (#370)
* Added livingdoc cli to test workflow Signed-off-by: Joss Sparkes <[email protected]> * Correct issue with publish step Signed-off-by: Joss Sparkes <[email protected]> * Changed path from Debug to Release Signed-off-by: Joss Sparkes <[email protected]> * test Signed-off-by: Joss Sparkes <[email protected]> * test Signed-off-by: Joss Sparkes <[email protected]> * test Signed-off-by: Joss Sparkes <[email protected]> * test Signed-off-by: Joss Sparkes <[email protected]> * test Signed-off-by: Joss Sparkes <[email protected]> * Removed Specflow.json that caused issues Signed-off-by: Joss Sparkes <[email protected]> * Changed test report to run even on failure Signed-off-by: Joss Sparkes <[email protected]> Signed-off-by: Joss Sparkes <[email protected]>
1 parent 200aec2 commit 752f987

File tree

3 files changed

+21
-17
lines changed

3 files changed

+21
-17
lines changed

.github/workflows/test.yml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ jobs:
109109
with:
110110
dotnet-version: ${{ env.DOTNET_VERSION }}
111111

112+
- name: Install LivingDoc CLI
113+
run: dotnet tool install --global SpecFlow.Plus.LivingDoc.CLI
114+
112115
- name: Enable NuGet cache
113116
uses: actions/[email protected]
114117
with:
@@ -129,12 +132,17 @@ jobs:
129132
run: find ~+ -type f -name "*.WorkflowExecutor.IntegrationTests.csproj" | xargs -L1 dotnet test
130133
working-directory: ./tests
131134

135+
- name: Generate LivingDoc HTML
136+
if: always()
137+
run: livingdoc test-assembly Monai.Deploy.WorkflowManager.WorkflowExecutor.IntegrationTests.dll -t TestExecution.json
138+
working-directory: ./tests/IntegrationTests/WorkflowExecutor.IntegrationTests/bin/Debug/net6.0
139+
132140
- name: Publish report
133141
if: always()
134142
uses: actions/upload-artifact@v3
135143
with:
136-
name: WorkflowExecutorIntegrationTestResults
137-
path: tests/IntegrationTests/WorkflowExecutor.IntegrationTests/bin/Debug/net6.0/TestExecution.json
144+
name: WorkflowExecutorIntegrationTestReport
145+
path: ./tests/IntegrationTests/WorkflowExecutor.IntegrationTests/bin/Debug/net6.0/LivingDoc.html
138146

139147
task-manager-integration-tests:
140148
runs-on: ubuntu-latest
@@ -178,6 +186,9 @@ jobs:
178186
with:
179187
dotnet-version: ${{ env.DOTNET_VERSION }}
180188

189+
- name: Install LivingDoc CLI
190+
run: dotnet tool install --global SpecFlow.Plus.LivingDoc.CLI
191+
181192
- name: Enable NuGet cache
182193
uses: actions/[email protected]
183194
with:
@@ -194,16 +205,21 @@ jobs:
194205
run: dotnet build -c Release --nologo --no-restore Monai.Deploy.WorkflowManager.sln
195206
working-directory: ./src
196207

197-
- name: Run WorkflowExecutor Integration Tests
208+
- name: Run TaskManager Integration Tests
198209
run: find ~+ -type f -name "*.TaskManager.IntegrationTests.csproj" | xargs -L1 dotnet test
199210
working-directory: ./tests
200211

212+
- name: Generate LivingDoc HTML
213+
if: always()
214+
run: livingdoc test-assembly Monai.Deploy.WorkflowManager.TaskManager.IntegrationTests.dll -t TestExecution.json
215+
working-directory: ./tests/IntegrationTests/TaskManager.IntegrationTests/bin/Debug/net6.0
216+
201217
- name: Publish report
202218
if: always()
203219
uses: actions/upload-artifact@v3
204220
with:
205-
name: TaskExecutorIntegrationTestResults
206-
path: tests/IntegrationTests/TaskManager.IntegrationTests/bin/Debug/net6.0/TestExecution.json
221+
name: TaskManagerIntegrationTestReport
222+
path: ./tests/IntegrationTests/TaskManager.IntegrationTests/bin/Debug/net6.0/LivingDoc.html
207223

208224
sonarscanner:
209225
runs-on: ubuntu-latest

tests/IntegrationTests/TaskManager.IntegrationTests/specflow.json

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

tests/IntegrationTests/WorkflowExecutor.IntegrationTests/specflow.json

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

0 commit comments

Comments
 (0)