From 0b71f997ca4f496713562bb5c589795aac6101f0 Mon Sep 17 00:00:00 2001 From: maguire-arman Date: Thu, 10 Jul 2025 13:39:19 -0400 Subject: [PATCH] Streamlines Playwright report merging in Docker Removes unnecessary directory listing commands from the Docker container execution within the Playwright test job. This change simplifies the execution and reduces the noise in the job logs, focusing on the core report merging process. The execution also uses semicolons instead of newlines to separate commands. --- temp/playwright-test.yml | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/temp/playwright-test.yml b/temp/playwright-test.yml index c3732eda2..4e2ebf45c 100644 --- a/temp/playwright-test.yml +++ b/temp/playwright-test.yml @@ -246,32 +246,20 @@ jobs: echo "Extracted JIRA Card number: '$JIRA_CARD_NUMBER'" export PLAYWRIGHT_PATH="${{ parameters.playwrightTestsPath }}" - echo "📁 Current directory: $(pwd)" - echo "📂 Contents of current directory:" - ls -al - - echo "📂 Contents of playwright-tests directory:" - ls -al $PLAYWRIGHT_PATH - - echo "📂 Contents of ./ortoni-report (if exists):" - ls -al ./ortoni-report || echo "No ortoni-report directory found" - - echo "📂 Contents of /app/test-results (if mounted later):" - ls -al ./test-results || echo "No /app/test-results directory found" container_id=$(docker create \ --ipc=host \ --env-file "${{ parameters.envFileName }}" \ -e JIRA_CARD_NUMBER="$JIRA_CARD_NUMBER" \ ${{ parameters.dockerImageName }}:${{ parameters.imageTag }} \ - echo 'Moving Playwright reports out of subfolders...' \ + echo 'Moving Playwright reports out of subfolders...'; \ find ./playwright-reports/ -mindepth 2 -type f -exec mv {} ./playwright-reports/ \; \ - echo 'Merging reports...' \ - PLAYWRIGHT_JUNIT_OUTPUT_DIR='/app/test-results' PLAYWRIGHT_JUNIT_OUTPUT_NAME='junit_results.xml' npx --prefix $PLAYWRIGHT_PATH playwright merge-reports ./playwright-reports \ - echo 'Contents of ortoni-report:' && ls ./ortoni-report \ - echo 'Current dir: ' && pwd \ - echo 'Contents of current dir: ' && ls \ - echo 'Contents of /app/test-results' && ls /app/test-results \ + echo 'Merging reports...'; \ + PLAYWRIGHT_JUNIT_OUTPUT_DIR='/app/test-results' PLAYWRIGHT_JUNIT_OUTPUT_NAME='junit_results.xml' npx --prefix $PLAYWRIGHT_PATH playwright merge-reports ./playwright-reports; \ + echo 'Contents of ortoni-report:' && ls ./ortoni-report; \ + echo 'Current dir: ' && pwd; \ + echo 'Contents of current dir: ' && ls; \ + echo 'Contents of /app/test-results' && ls /app/test-results; \ ) # Start container and stream logs echo "Starting merge"