From 5b6d0cefc301a0842a77771b23acea4bd0c8b0b9 Mon Sep 17 00:00:00 2001 From: afscrome Date: Sun, 2 Aug 2026 11:14:18 +0100 Subject: [PATCH] Gate test diagnostics on run-tests execution Prevent Aspire doctor and failure log uploads from running when the Run tests step is skipped by gating those steps on the run-tests outcome. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/tests.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 8ed9975a9..0ebcab236 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -107,6 +107,7 @@ jobs: dotnet build ${{ github.workspace }}/${{ env.TEST_PROJECT_PATH }} /bl --configuration ${{ env.DOTNET_CONFIGURATION }} - name: Run tests + id: run-tests run: >- dotnet run --project "${{ github.workspace }}/${{ env.TEST_PROJECT_PATH }}" @@ -150,19 +151,19 @@ jobs: path: testresults/** - name: Upload npm logs if failed - if: failure() + if: failure() && steps.run-tests.outcome != 'skipped' uses: actions/upload-artifact@v7 with: name: npm-logs-${{ matrix.name }}-${{ matrix.os }} path: ${{ runner.os == 'Windows' && 'C:\\npm\\cache\\_logs\\**' || '~/.npm/cache/_logs/**' }} - name: Upload TypeScript app host logs if failed - if: failure() + if: failure() && steps.run-tests.outcome != 'skipped' uses: actions/upload-artifact@v7 with: name: ts-app-host-logs-${{ matrix.name }}-${{ matrix.os }} path: ${{ runner.os == 'Windows' && 'C:\\Users\\runneradmin\\.aspire\\logs\\**' || '/home/runner/.aspire/logs/**' }} - name: Aspire doctor - if: failure() + if: failure() && steps.run-tests.outcome != 'skipped' run: aspire doctor