mirror of
https://github.com/vector-im/element-web.git
synced 2025-12-25 11:11:31 +01:00
As the comment indicated, this apparently was necessary to get stuff built the first time, but does not appear to be necessary anymore and looks to be causing occasional flakiness, so let's remove it.
67 lines
2.4 KiB
YAML
67 lines
2.4 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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
|
|
with:
|
|
persist-credentials: false
|
|
repository: element-hq/element-web
|
|
|
|
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
|
|
with:
|
|
cache: "yarn"
|
|
node-version: "lts/*"
|
|
|
|
- name: Install element web dependencies
|
|
run: yarn install --frozen-lockfile
|
|
|
|
- name: Install dependencies
|
|
working-directory: packages/shared-components
|
|
run: yarn install --frozen-lockfile
|
|
|
|
- name: Get installed Playwright version
|
|
working-directory: packages/shared-components
|
|
id: playwright
|
|
run: echo "version=$(yarn list --pattern @playwright/test --depth=0 --json --non-interactive --no-progress | jq -r '.data.trees[].name')" >> $GITHUB_OUTPUT
|
|
|
|
- name: Cache playwright binaries
|
|
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
|
|
id: playwright-cache
|
|
with:
|
|
path: ~/.cache/ms-playwright
|
|
key: ${{ runner.os }}-${{ runner.arch }}-playwright-${{ steps.playwright.outputs.version }}-onlyshell
|
|
|
|
- name: Install Playwright browsers
|
|
working-directory: packages/shared-components
|
|
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
|
run: "yarn playwright install --with-deps --only-shell"
|
|
|
|
- name: Run Visual tests
|
|
run: "yarn --cwd packages/shared-components test:storybook:ci"
|
|
|
|
- name: Upload received images & diffs
|
|
if: always()
|
|
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
|
|
with:
|
|
name: received-images
|
|
path: packages/shared-components/playwright/shared-component-received
|