mirror of
https://github.com/vector-im/element-web.git
synced 2026-07-05 14:59:23 +00:00
003ebad3ab
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
71 lines
2.5 KiB
YAML
71 lines
2.5 KiB
YAML
name: Shared Component Visual Tests
|
|
on:
|
|
pull_request: {}
|
|
merge_group:
|
|
types: [checks_requested]
|
|
push:
|
|
branches: [develop, master]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
|
|
cancel-in-progress: true
|
|
|
|
permissions: {} # No permissions required
|
|
|
|
jobs:
|
|
testStorybook:
|
|
name: "Run Visual Tests"
|
|
runs-on: ubuntu-24.04
|
|
permissions:
|
|
actions: read
|
|
issues: read
|
|
pull-requests: read
|
|
steps:
|
|
# Dump the disk usage before we start: this job frequently flakes with "No space left on device"
|
|
# so, with the one at the end too, this will let us work out how much disk has been used.
|
|
- name: dfbefore
|
|
run: df -h && df -i
|
|
|
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
|
with:
|
|
persist-credentials: false
|
|
repository: element-hq/element-web
|
|
|
|
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
|
|
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
|
with:
|
|
cache: "pnpm"
|
|
node-version: "lts/*"
|
|
|
|
- name: Install dependencies
|
|
working-directory: packages/shared-components
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Setup playwright
|
|
uses: ./.github/actions/setup-playwright
|
|
with:
|
|
write-cache: ${{ github.event_name != 'merge_group' }}
|
|
|
|
- name: Run Visual tests
|
|
working-directory: packages/shared-components
|
|
run: "pnpm test:storybook --run"
|
|
|
|
- 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()
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
|
with:
|
|
name: received-images
|
|
path: packages/shared-components/__vis__/linux
|
|
|
|
# Dump the disk usage on failure, because this job seems to fail with disk fills sometimes
|
|
- name: df
|
|
run: df -h && df -i
|
|
if: ${{ failure() }}
|