diff --git a/.github/workflows/ms.network.virtualnetworks.yml b/.github/workflows/ms.network.virtualnetworks.yml index 7a7feeeeb8..ffc885a1bc 100644 --- a/.github/workflows/ms.network.virtualnetworks.yml +++ b/.github/workflows/ms.network.virtualnetworks.yml @@ -34,6 +34,7 @@ env: ARM_TENANT_ID: '${{ secrets.ARM_TENANT_ID }}' TOKEN_NAMEPREFIX: '${{ secrets.TOKEN_NAMEPREFIX }}' + jobs: ########################### # Initialize pipeline # @@ -153,8 +154,19 @@ jobs: with: modules: 'PSRule.Rules.Azure' inputPath: '${{ env.modulePath }}/${{ matrix.moduleTestFilePaths }}' - outputFormat: Sarif + outputFormat: Markdown + outputPath: '${{ env.modulePath }}/${{ matrix.moduleTestFilePaths }}-output.md' option: '${{ env.modulePath }}/.test/vnet-ps-rule.yaml' + + # - name: 'PSRule test summary' + # uses: EnricoMi/publish-unit-test-result-action@v1 + # if: always() + # with: + # files: '${{ env.modulePath }}/${{ matrix.moduleTestFilePaths }}-output.xml' + + - name: Output to Github summaries + if: always() + run: cat '${{ env.modulePath }}/${{ matrix.moduleTestFilePaths }}-output.md' >> $GITHUB_STEP_SUMMARY # ############################# # # Deployment validation # diff --git a/modules/Microsoft.Network/virtualNetworks/.test/vnet-ps-rule.yaml b/modules/Microsoft.Network/virtualNetworks/.test/vnet-ps-rule.yaml index 589d2ab3b7..7012418c3c 100644 --- a/modules/Microsoft.Network/virtualNetworks/.test/vnet-ps-rule.yaml +++ b/modules/Microsoft.Network/virtualNetworks/.test/vnet-ps-rule.yaml @@ -26,6 +26,9 @@ include: output: culture: - 'en-US' + outcome: 'Fail' + as: 'Summary' + input: pathIgnore: diff --git a/ps-rule.yaml b/ps-rule.yaml index a0dbe090f4..151c9a2173 100644 --- a/ps-rule.yaml +++ b/ps-rule.yaml @@ -27,6 +27,7 @@ output: culture: - 'en-US' + input: pathIgnore: # Ignore other files in the repository.