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.
This commit is contained in:
parent
6626e7dc58
commit
0b71f997ca
1 changed files with 7 additions and 19 deletions
|
|
@ -246,32 +246,20 @@ jobs:
|
||||||
echo "Extracted JIRA Card number: '$JIRA_CARD_NUMBER'"
|
echo "Extracted JIRA Card number: '$JIRA_CARD_NUMBER'"
|
||||||
export PLAYWRIGHT_PATH="${{ parameters.playwrightTestsPath }}"
|
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 \
|
container_id=$(docker create \
|
||||||
--ipc=host \
|
--ipc=host \
|
||||||
--env-file "${{ parameters.envFileName }}" \
|
--env-file "${{ parameters.envFileName }}" \
|
||||||
-e JIRA_CARD_NUMBER="$JIRA_CARD_NUMBER" \
|
-e JIRA_CARD_NUMBER="$JIRA_CARD_NUMBER" \
|
||||||
${{ parameters.dockerImageName }}:${{ parameters.imageTag }} \
|
${{ 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/ \; \
|
find ./playwright-reports/ -mindepth 2 -type f -exec mv {} ./playwright-reports/ \; \
|
||||||
echo 'Merging 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 \
|
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 'Contents of ortoni-report:' && ls ./ortoni-report; \
|
||||||
echo 'Current dir: ' && pwd \
|
echo 'Current dir: ' && pwd; \
|
||||||
echo 'Contents of current dir: ' && ls \
|
echo 'Contents of current dir: ' && ls; \
|
||||||
echo 'Contents of /app/test-results' && ls /app/test-results \
|
echo 'Contents of /app/test-results' && ls /app/test-results; \
|
||||||
)
|
)
|
||||||
# Start container and stream logs
|
# Start container and stream logs
|
||||||
echo "Starting merge"
|
echo "Starting merge"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue