mirror of
https://github.com/vector-im/element-web.git
synced 2026-04-18 03:52:39 +02:00
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
60 lines
2.0 KiB
YAML
60 lines
2.0 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:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
with:
|
|
persist-credentials: false
|
|
repository: element-hq/element-web
|
|
|
|
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5
|
|
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # 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"
|
|
|
|
# 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: Upload received images & diffs
|
|
if: always()
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
|
with:
|
|
name: received-images
|
|
path: packages/shared-components/__vis__/linux
|