Add CI to detect stale vis screenshots (#33274)
* Add CI to detect stale vis screenshots * Remove already installed `tree` command * Remove workaround for vis silently adding missing screenshots in CI * Fix stale screenshot detection * Test that CI doesn't silently create new screenshots * Discard changes to packages/shared-components/src/room/composer/Banner/Banner.stories.tsx * Delete stale snapshots
This commit is contained in:
committed by
GitHub
parent
8f9953f419
commit
1a6b0e22a1
@@ -25,9 +25,6 @@ jobs:
|
||||
actions: read
|
||||
deployments: write
|
||||
steps:
|
||||
- name: Install tree
|
||||
run: "sudo apt-get install -y tree"
|
||||
|
||||
- name: Download Diffs
|
||||
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
|
||||
with:
|
||||
|
||||
@@ -45,11 +45,12 @@ jobs:
|
||||
working-directory: packages/shared-components
|
||||
run: "pnpm test:storybook --run"
|
||||
|
||||
# Workaround for vis silently adding new baselines if they didn't exist
|
||||
# Can be removed once https://github.com/repobuddy/visual-testing/issues/516 is released
|
||||
- run: |
|
||||
git add -N .
|
||||
git diff --exit-code
|
||||
- name: Detect stale screenshots
|
||||
run: |
|
||||
if diff -rq __baselines__ __results__ | grep "^Only in __baselines__"; then
|
||||
exit 1
|
||||
fi
|
||||
working-directory: packages/shared-components/__vis__/linux
|
||||
|
||||
- name: Upload received images & diffs
|
||||
if: always()
|
||||
|
||||
Reference in New Issue
Block a user