From e79b3c79cde16b5345721049de80e1ceb42a7a9e Mon Sep 17 00:00:00 2001 From: marv Date: Sun, 27 Oct 2024 11:26:00 -0700 Subject: [PATCH] Fix Flaky Test Comment (#1536) --- .github/workflows/playwright_comment.yml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/workflows/playwright_comment.yml b/.github/workflows/playwright_comment.yml index 992ffcea5..8b3d5bb69 100644 --- a/.github/workflows/playwright_comment.yml +++ b/.github/workflows/playwright_comment.yml @@ -65,33 +65,23 @@ jobs: message: | :heavy_exclamation_mark: Could not fetch screenshots from master branch, so had nothing to make a visual comparison against; please check the "master-screenshots" step in the workflow run and rerun it before merging. - - name: "[Comment] Warning: Flaky tests caused by this PR; please check the playwright report" + - name: "[Comment] Warning: Flaky tests or visual differences caused by this PR; please check the playwright report" uses: mshick/add-pr-comment@dd126dd8c253650d181ad9538d8b4fa218fc31e8 # pin@v2 - if: steps.playwright.outputs.MASTER_SCREENSHOTS_OUTCOME != 'failure' && steps.playwright.outputs.FLAKY != 0 + if: steps.playwright.outputs.MASTER_SCREENSHOTS_OUTCOME != 'failure' && (steps.playwright.outputs.FLAKY != 0 || steps.playwright.outputs.FAILED != 0) with: issue: ${{ steps.source-run-info.outputs.pullRequestNumber }} message: | - :warning: Flaky tests caused by this PR; please check the playwright report. - - View Playwright Report (note: open the "playwright-report" artifact) - - - name: "[Comment] Warning: Visual differences introduced by this PR" - uses: mshick/add-pr-comment@dd126dd8c253650d181ad9538d8b4fa218fc31e8 # pin@v2 - if: steps.playwright.outputs.MASTER_SCREENSHOTS_OUTCOME != 'failure' && steps.playwright.outputs.FAILED != 0 - with: - issue: ${{ steps.source-run-info.outputs.pullRequestNumber }} - message: | - :warning: Visual differences introduced by this PR; please validate if they are desirable. + :warning: Flaky tests or visual differences caused by this PR; please check the playwright report. View Playwright Report (note: open the "playwright-report" artifact) - name: "[Comment] Success: No visual differences introduced by this PR" uses: mshick/add-pr-comment@dd126dd8c253650d181ad9538d8b4fa218fc31e8 # pin@v2 - if: steps.playwright.outputs.MASTER_SCREENSHOTS_OUTCOME != 'failure' && steps.playwright.outputs.FAILED == 0 + if: steps.playwright.outputs.MASTER_SCREENSHOTS_OUTCOME != 'failure' && steps.playwright.outputs.FLAKY == 0 && steps.playwright.outputs.FAILED == 0 with: issue: ${{ steps.source-run-info.outputs.pullRequestNumber }} message: | :heavy_check_mark: No visual differences introduced by this PR. View Playwright Report (note: open the "playwright-report" artifact) - update-only: true + update-only: true \ No newline at end of file