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
@@ -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()
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 199 KiB |
|
Before Width: | Height: | Size: 201 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 23 KiB |