From c5437f3346da53e5e94694fbf9270bc0d7b43a95 Mon Sep 17 00:00:00 2001 From: Mitch Denny Date: Thu, 5 Feb 2026 15:29:47 +1100 Subject: [PATCH] Upload CLI E2E recordings as dedicated artifacts - Add step in run-tests.yml to copy .cast files and upload as 'cli-e2e-recordings-{TestName}' artifacts - Simplify cli-e2e-recording-comment.yml to filter by artifact name prefix - Removes need for hardcoded test class name list --- .../workflows/cli-e2e-recording-comment.yml | 17 ++++------------- .github/workflows/run-tests.yml | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/.github/workflows/cli-e2e-recording-comment.yml b/.github/workflows/cli-e2e-recording-comment.yml index 4a6c0415930..04bbf26c889 100644 --- a/.github/workflows/cli-e2e-recording-comment.yml +++ b/.github/workflows/cli-e2e-recording-comment.yml @@ -104,22 +104,13 @@ jobs: console.log(`Total artifacts found: ${allArtifacts.length}`); - // Filter for CLI E2E test logs (they contain recordings) + // Filter for CLI E2E recording artifacts (simple pattern match) + // These are uploaded by the run-tests workflow with name: cli-e2e-recordings-{TestName} const cliE2eArtifacts = allArtifacts.filter(a => - a.name.startsWith('logs-') && - a.name.includes('Tests-ubuntu-latest') && - (a.name.includes('SmokeTests') || - a.name.includes('EmptyAppHostTemplateTests') || - a.name.includes('JsReactTemplateTests') || - a.name.includes('PythonReactTemplateTests') || - a.name.includes('DockerDeploymentTests') || - a.name.includes('TypeScriptPolyglotTests') || - a.name.includes('DoctorCommandTests') || - a.name.includes('StartStopTests') || - a.name.includes('PsCommandTests')) + a.name.startsWith('cli-e2e-recordings-') ); - console.log(`Found ${cliE2eArtifacts.length} CLI E2E artifacts`); + console.log(`Found ${cliE2eArtifacts.length} CLI E2E recording artifacts`); // Create recordings directory const recordingsDir = 'recordings'; diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 5114af9d611..6a4b210a99a 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -516,6 +516,25 @@ jobs: artifacts/bin/Aspire.Templates.Tests/Debug/net8.0/logs/** artifacts/log/test-logs/** + - name: Copy CLI E2E recordings for upload + if: always() + shell: bash + run: | + mkdir -p cli-e2e-recordings + find testresults -name "*.cast" -exec cp {} cli-e2e-recordings/ \; 2>/dev/null || true + if [ -n "$(ls -A cli-e2e-recordings 2>/dev/null)" ]; then + echo "Found recordings:" + ls -la cli-e2e-recordings/ + fi + + - name: Upload CLI E2E recordings + if: always() + uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1 + with: + name: cli-e2e-recordings-${{ inputs.testShortName }} + path: cli-e2e-recordings/*.cast + if-no-files-found: ignore + - name: Generate test results summary if: always() shell: pwsh