mirror of
https://github.com/vector-im/element-web.git
synced 2026-03-04 13:01:12 +01:00
* Use typescript for vite config Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Switch shared-components to ESM Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Remove stale aliases Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Remove reference to element-web files from shared-components Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Remove spurious node polyfill Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
65 lines
2.4 KiB
YAML
65 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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
|
with:
|
|
persist-credentials: false
|
|
repository: element-hq/element-web
|
|
|
|
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
|
|
with:
|
|
cache: "yarn"
|
|
node-version: "lts/*"
|
|
|
|
- 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@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5
|
|
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
|
|
working-directory: packages/shared-components
|
|
run: "yarn test:storybook:ci"
|
|
|
|
- name: Upload received images & diffs
|
|
if: always()
|
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
|
with:
|
|
name: received-images
|
|
path: packages/shared-components/playwright/shared-component-received
|