aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/playwright_comment.yml11
1 files changed, 6 insertions, 5 deletions
diff --git a/.github/workflows/playwright_comment.yml b/.github/workflows/playwright_comment.yml
index 9b068f56..429adf3d 100644
--- a/.github/workflows/playwright_comment.yml
+++ b/.github/workflows/playwright_comment.yml
@@ -18,7 +18,6 @@ jobs:
- name: Grab playwright-output from PR run
uses: dawidd6/action-download-artifact@5e780fc7bbd0cac69fc73271ed86edf5dcb72d67 # pin@v2
continue-on-error: true
- id: playwright-output
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
run_id: ${{ github.event.workflow_run.id }}
@@ -27,7 +26,6 @@ jobs:
- name: Grab master-screenshots-outcome from PR run
uses: dawidd6/action-download-artifact@5e780fc7bbd0cac69fc73271ed86edf5dcb72d67 # pin@v2
continue-on-error: true
- id: master-screenshots-outcome
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
run_id: ${{ github.event.workflow_run.id }}
@@ -40,18 +38,21 @@ jobs:
echo "PLAYWRIGHT_OUTPUT<<$EOF" >> $GITHUB_OUTPUT
cat ./playwright-output >> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
+ echo "MASTER_SCREENSHOTS_OUTCOME<<$EOF" >> $GITHUB_OUTPUT
+ cat ./master-screenshots-outcome >> $GITHUB_OUTPUT
+ echo "$EOF" >> $GITHUB_OUTPUT
echo "NUM_FAILED=$(grep -c 'Screenshot comparison failed' $GITHUB_OUTPUT)" >> $GITHUB_OUTPUT
- name: "[Comment] Couldn't download screenshots from master branch"
uses: mshick/add-pr-comment@a65df5f64fc741e91c59b8359a4bc56e57aaf5b1 # pin@v2
- if: github.event_name == 'pull_request' && steps.master-screenshots-outcome == 'failure'
+ if: github.event_name == 'pull_request' && steps.playwright.outputs.MASTER_SCREENSHOTS_OUTCOME == 'failure'
with:
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] Success: No visual differences introduced by this PR"
uses: mshick/add-pr-comment@a65df5f64fc741e91c59b8359a4bc56e57aaf5b1 # pin@v2
- if: github.event_name == 'pull_request' && steps.master-screenshots-outcome != 'failure' && steps.playwright.outputs.NUM_FAILED == 0
+ if: github.event_name == 'pull_request' && steps.playwright.outputs.MASTER_SCREENSHOTS_OUTCOME != 'failure' && steps.playwright.outputs.NUM_FAILED == 0
with:
message: |
:heavy_check_mark: No visual differences introduced by this PR.
@@ -59,7 +60,7 @@ jobs:
- name: "[Comment] Warning: Visual differences introduced by this PR"
uses: mshick/add-pr-comment@a65df5f64fc741e91c59b8359a4bc56e57aaf5b1 # pin@v2
- if: github.event_name == 'pull_request' && steps.master-screenshots-outcome != 'failure' && steps.playwright.outputs.NUM_FAILED != 0
+ if: github.event_name == 'pull_request' && steps.playwright.outputs.MASTER_SCREENSHOTS_OUTCOME != 'failure' && steps.playwright.outputs.NUM_FAILED != 0
with:
message: |
:warning: ${{ steps.playwright.outputs.NUM_FAILED }} visual differences introduced by this PR; please validate if they are desirable.