Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Build the playwright html report in the main workflow (#12570)
Browse files Browse the repository at this point in the history
* Build the playwright html report in the main workflow

so we can get the report for MQ

Signed-off-by: Michael Telatynski <[email protected]>

* fix

Signed-off-by: Michael Telatynski <[email protected]>

---------

Signed-off-by: Michael Telatynski <[email protected]>
  • Loading branch information
t3chguy authored Jun 3, 2024
1 parent c3769ad commit 3085070
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 27 deletions.
29 changes: 2 additions & 27 deletions .github/workflows/end-to-end-tests-netlify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,38 +21,13 @@ jobs:
statuses: write
deployments: write
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- uses: actions/setup-node@v4
with:
cache: "yarn"

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Download blob reports from GitHub Actions Artifacts
- name: Download HTML report
uses: actions/download-artifact@v4
with:
github-token: ${{ secrets.ELEMENT_BOT_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
pattern: all-blob-reports-*
path: all-blob-reports
merge-multiple: true

- name: Merge into HTML Report
run: yarn playwright merge-reports --reporter=html,./playwright/flaky-reporter.ts ./all-blob-reports
env:
# Only pass creds to the flaky-reporter on main branch runs
GITHUB_TOKEN: ${{ github.event.workflow_run.head_branch == 'develop' && secrets.ELEMENT_BOT_TOKEN || '' }}

- name: Upload HTML report
uses: actions/upload-artifact@v4
with:
name: html-report--attempt-${{ github.run_attempt }}
name: html-report
path: playwright-report
retention-days: 14

- name: 📤 Deploy to Netlify
uses: matrix-org/netlify-pr-preview@v3
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/end-to-end-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,34 @@ jobs:
steps:
- if: needs.playwright.result != 'skipped' && needs.playwright.result != 'success'
run: exit 1

- uses: actions/checkout@v4
with:
persist-credentials: false

- uses: actions/setup-node@v4
with:
cache: "yarn"

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Download blob reports from GitHub Actions Artifacts
uses: actions/download-artifact@v4
with:
pattern: all-blob-reports-*
path: all-blob-reports
merge-multiple: true

- name: Merge into HTML Report
run: yarn playwright merge-reports --reporter=html,./playwright/flaky-reporter.ts ./all-blob-reports
env:
# Only pass creds to the flaky-reporter on main branch runs
GITHUB_TOKEN: ${{ github.event.workflow_run.head_branch == 'develop' && secrets.ELEMENT_BOT_TOKEN || '' }}

- name: Upload HTML report
uses: actions/upload-artifact@v4
with:
name: html-report
path: playwright-report
retention-days: 14

0 comments on commit 3085070

Please sign in to comment.