Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload failed Visual Regression tests #106

Merged
merged 1 commit into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,10 @@ jobs:
run: pnpm run test:visual --color
env:
RUNTIME_ENV: ci

- name: Upload failed-results as artifact
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: failed-results
path: visual-regression/failed-results/
12 changes: 12 additions & 0 deletions visual-regression/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,18 @@ to speed up the time it takes to verify if your changes cause any regressions.
3. Before pushing new commits to the remote PR branch, compare your changes
to the snapshots you took prior to starting your PR: `pnpm test:visual`

## GitHub Actions Workflow

The Visual Regression Tests run as a status check on every pull request update
via the GitHub Actions workflow defined in `.github/workflows/tests.yml`. The tests
that run are compared with the snapshots in the `certified-snapshots/chromium-ci`
directory.

When tests failed, the failure results that you normally find in
`visual-regression/failed-results` are uploaded to the workflow run as a zip file
artifact named **failed-results**. See [Where does the upload go?](https://github.com/actions/upload-artifact#where-does-the-upload-go)
for more on how to find it.

## How to define Snapshots

The Snapshots themselves are defined in the individual Example Tests located in the
Expand Down