mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-10 10:20:38 +08:00
Extracts the avatar components and the style tokens into shared/ui, which both apps consume as a workspace package, to try out ADR 2. Nix and the Docker setups are not updated yet.
91 lines
2.5 KiB
YAML
91 lines
2.5 KiB
YAML
name: desktop-e2e
|
|
# Only desktop, shared/ui and root npm changes, or changes to this workflow,
|
|
# run it.
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "desktop/**"
|
|
- "shared/**"
|
|
- "package.json"
|
|
- "package-lock.json"
|
|
- ".npmrc"
|
|
- ".nvmrc"
|
|
- ".github/workflows/desktop-e2e.yml"
|
|
push:
|
|
paths:
|
|
- "desktop/**"
|
|
- "shared/**"
|
|
- "package.json"
|
|
- "package-lock.json"
|
|
- ".npmrc"
|
|
- ".nvmrc"
|
|
- ".github/workflows/desktop-e2e.yml"
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
# Debug info is most of a target/ directory. Line tables keep file:line in
|
|
# panics and backtraces, and make builds and caches much smaller.
|
|
CARGO_PROFILE_DEV_DEBUG: line-tables-only
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: desktop
|
|
|
|
jobs:
|
|
e2e:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: mcr.microsoft.com/playwright:v1.61.1-noble
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version-file: ".nvmrc"
|
|
|
|
- run: |
|
|
apt-get update && apt-get install -y --no-install-recommends \
|
|
build-essential \
|
|
pkg-config \
|
|
xz-utils \
|
|
libssl-dev \
|
|
libxdo-dev \
|
|
libayatana-appindicator3-dev \
|
|
librsvg2-dev \
|
|
libwebkit2gtk-4.1-dev \
|
|
libjavascriptcoregtk-4.1-dev \
|
|
openssh-client
|
|
- run: npm ci
|
|
# The version in desktop/rust-toolchain.toml, which cargo uses here.
|
|
- uses: dtolnay/rust-toolchain@1.97.1
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: desktop
|
|
# Only master saves, so patches share its caches instead of each
|
|
# storing their own, which pushes the repo over GitHub's 10 GB limit.
|
|
save-if: ${{ github.ref == 'refs/heads/master' }}
|
|
|
|
- name: Cache heartwood binaries
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: desktop/tests/tmp/bin
|
|
key: heartwood-${{ hashFiles('desktop/tests/support/heartwood-release') }}
|
|
|
|
- run: scripts/install-binaries
|
|
- run: npm run build:http
|
|
- run: mkdir -p tests/artifacts
|
|
|
|
- name: Run e2e tests
|
|
run: npm run test:e2e
|
|
|
|
# Kept for passing runs too: a test that passed on retry still leaves
|
|
# the failed attempt's logs and trace behind.
|
|
- name: Upload test artifacts
|
|
if: ${{ !cancelled() }}
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
name: desktop-e2e-artifacts
|
|
path: desktop/tests/artifacts
|
|
retention-days: 7
|