Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print instructions to view Playwright test report #4575

Merged
merged 4 commits into from
Apr 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading