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:
Michael Telatynski
2026-04-23 10:24:31 +01:00
committed by GitHub
parent 8f9953f419
commit 1a6b0e22a1
40 changed files with 6 additions and 8 deletions
@@ -25,9 +25,6 @@ jobs:
actions: read actions: read
deployments: write deployments: write
steps: steps:
- name: Install tree
run: "sudo apt-get install -y tree"
- name: Download Diffs - name: Download Diffs
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with: with:
@@ -45,11 +45,12 @@ jobs:
working-directory: packages/shared-components working-directory: packages/shared-components
run: "pnpm test:storybook --run" run: "pnpm test:storybook --run"
# Workaround for vis silently adding new baselines if they didn't exist - name: Detect stale screenshots
# Can be removed once https://github.com/repobuddy/visual-testing/issues/516 is released run: |
- run: | if diff -rq __baselines__ __results__ | grep "^Only in __baselines__"; then
git add -N . exit 1
git diff --exit-code fi
working-directory: packages/shared-components/__vis__/linux
- name: Upload received images & diffs - name: Upload received images & diffs
if: always() if: always()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB