E2E Tests Report #4689
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: E2E Tests Report | |
on: | |
workflow_run: | |
workflows: ['E2E Tests'] | |
types: | |
- completed | |
jobs: | |
publish_report: | |
name: Publish E2E Report | |
if: > | |
github.event.workflow_run.event == 'pull_request' && | |
(github.event.workflow_run.conclusion == 'success' || github.event.workflow_run.conclusion == 'failure') | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: write | |
steps: | |
- name: Checkout main | |
uses: actions/checkout@v2 | |
with: | |
ref: main | |
- name: Download Artifacts | |
uses: dawidd6/action-download-artifact@v6 | |
with: | |
workflow: ${{ github.event.workflow_run.workflow_id }} | |
run_id: ${{ github.event.workflow_run.id }} | |
- name: Extract env from workflow | |
run: | | |
echo "HTML_REPORT_URL_PATH=$(cat playwright-report/report-link)" >> "$GITHUB_ENV" | |
echo "REPORT_PR_NUMBER=$(cat playwright-report/report-pr)" >> "$GITHUB_ENV" | |
- name: Upload HTML Report | |
timeout-minutes: 3 | |
uses: shallwefootball/s3-upload-action@master | |
with: | |
aws_key_id: ${{ secrets.E2E_REPORT_S3_ACCESS_KEY }} | |
aws_secret_access_key: ${{ secrets.E2E_REPORT_S3_SECRET_KEY}} | |
aws_bucket: ${{ vars.E2E_REPORT_S3_BUCKET }} | |
endpoint: ${{ vars.E2E_REPORT_S3_ENDPOINT }} | |
source_dir: playwright-report/report | |
destination_dir: ${{ env.HTML_REPORT_URL_PATH }}/report | |
- name: Output Report URL as Worfklow Annotation | |
run: | | |
FULL_HTML_REPORT_URL=https://${{ vars.E2E_REPORT_S3_BUCKET }}.${{ vars.E2E_REPORT_HTML_ENDPOINT }}/${{ env.HTML_REPORT_URL_PATH }}/report | |
echo "FULL_HTML_REPORT_URL=${FULL_HTML_REPORT_URL}" >> "$GITHUB_ENV" | |
echo "::notice title=📋 Published Playwright Test Report::$FULL_HTML_REPORT_URL" | |
- name: Create Comment | |
uses: marocchino/sticky-pull-request-comment@v2 | |
with: | |
header: e2e-report | |
number: ${{ env.REPORT_PR_NUMBER }} | |
message: '[E2E Report](${{ env.FULL_HTML_REPORT_URL }}) is ready.' |