Skip to content

Commit

Permalink
Print instructions to view Playwright test report (#4575)
Browse files Browse the repository at this point in the history
* Print instructions to view Playwright test report
  • Loading branch information
sgalsaleh authored Apr 26, 2024
1 parent b327b94 commit f3742c6
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/actions/kots-e2e/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,30 @@ runs:
SKIP_TEARDOWN=1
shell: bash

- uses: actions/upload-artifact@v4
- id: upload-playwright-report
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: ${{ github.job }}-${{ inputs.k8s-distribution }}-${{ inputs.k8s-version }}-playwright-report
path: ./e2e/playwright/playwright-report/

- name: Print instructions to view Playwright report
if: ${{ failure() && steps.upload-playwright-report.outputs.artifact-url != '' }}
run: |
echo -e "\e[1;33m┌──────────────────────────────────────────────────────────────────────────────────────────────────────┐\e[0m"
echo -e "\e[1;33m To view the Playwright test report: \e[0m"
echo -e "\e[1;33m \e[0m"
echo -e "\e[1;33m 1- Download & extract the report from: \e[0m"
echo -e "\e[1;33m \e[0m"
echo -e "\e[1;34m ${{ steps.upload-playwright-report.outputs.artifact-url }} \e[0m"
echo -e "\e[1;33m \e[0m"
echo -e "\e[1;33m 2- From inside the extracted directory, run: \e[0m"
echo -e "\e[1;33m \e[0m"
echo -e "\e[1;32m npx playwright show-report . \e[0m"
echo -e "\e[1;33m \e[0m"
echo -e "\e[1;33m└──────────────────────────────────────────────────────────────────────────────────────────────────────┘\e[0m"
shell: bash

- name: Print logs on failure
if: ${{ failure() }}
env:
Expand Down

0 comments on commit f3742c6

Please sign in to comment.