From 30850709ef6fce7f8abc4a8e2cb2ef5bf39439e9 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 3 Jun 2024 11:03:26 +0100 Subject: [PATCH] Build the playwright html report in the main workflow (#12570) * Build the playwright html report in the main workflow so we can get the report for MQ Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * fix Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .../workflows/end-to-end-tests-netlify.yaml | 29 ++--------------- .github/workflows/end-to-end-tests.yaml | 31 +++++++++++++++++++ 2 files changed, 33 insertions(+), 27 deletions(-) diff --git a/.github/workflows/end-to-end-tests-netlify.yaml b/.github/workflows/end-to-end-tests-netlify.yaml index 4667bfb02b3..a488cbbfb09 100644 --- a/.github/workflows/end-to-end-tests-netlify.yaml +++ b/.github/workflows/end-to-end-tests-netlify.yaml @@ -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 diff --git a/.github/workflows/end-to-end-tests.yaml b/.github/workflows/end-to-end-tests.yaml index 0e224c04db5..7901bfb343a 100644 --- a/.github/workflows/end-to-end-tests.yaml +++ b/.github/workflows/end-to-end-tests.yaml @@ -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