Skip to content

Commit

Permalink
ci: Upload screenshots on test failures (#4917)
Browse files Browse the repository at this point in the history
This will upload screenshots when the Selenium lab tests fail. This can
be used to get screenshot changes either for examination or for updating
the test expectations.
  • Loading branch information
joeyparrish authored Jan 19, 2023
1 parent da84a2c commit eeb647c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/selenium-lab-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,20 @@ jobs:
# there.
if-no-files-found: error

# Upload new screenshots and diffs on failure; ignore if missing
- name: Upload screenshots
uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
# In this workflow, "browser" is the selenium node name, which can
# contain both browser and OS, such as "ChromeLinux".
name: screenshots-${{ matrix.browser }}
path: |
test/test/assets/screenshots/*/*.png-new
test/test/assets/screenshots/*/*.png-diff
if-no-files-found: ignore
retention-days: 5

- name: Report final commit status
# Will run on success or failure, but not if the workflow is cancelled.
if: ${{ success() || failure() }}
Expand Down

0 comments on commit eeb647c

Please sign in to comment.