mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 22:30:41 +08:00
Share UI code through an npm workspace
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.
This commit is contained in:
@@ -1,13 +1,24 @@
|
||||
name: desktop-e2e
|
||||
# Only desktop changes, or changes to this workflow, run it.
|
||||
# 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:
|
||||
|
||||
@@ -31,7 +42,7 @@ jobs:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version-file: "desktop/.nvmrc"
|
||||
node-version-file: ".nvmrc"
|
||||
|
||||
- run: |
|
||||
apt-get update && apt-get install -y --no-install-recommends \
|
||||
|
||||
@@ -1,13 +1,24 @@
|
||||
name: desktop-lint
|
||||
# Only desktop changes, or changes to this workflow, run it.
|
||||
# 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-lint.yml"
|
||||
push:
|
||||
paths:
|
||||
- "desktop/**"
|
||||
- "shared/**"
|
||||
- "package.json"
|
||||
- "package-lock.json"
|
||||
- ".npmrc"
|
||||
- ".nvmrc"
|
||||
- ".github/workflows/desktop-lint.yml"
|
||||
workflow_dispatch:
|
||||
|
||||
@@ -29,7 +40,7 @@ jobs:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version-file: "desktop/.nvmrc"
|
||||
node-version-file: ".nvmrc"
|
||||
|
||||
- run: npm ci
|
||||
- run: npm run check-js
|
||||
|
||||
@@ -1,13 +1,24 @@
|
||||
name: desktop-unit-test
|
||||
# Only desktop changes, or changes to this workflow, run it.
|
||||
# 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-unit-test.yml"
|
||||
push:
|
||||
paths:
|
||||
- "desktop/**"
|
||||
- "shared/**"
|
||||
- "package.json"
|
||||
- "package-lock.json"
|
||||
- ".npmrc"
|
||||
- ".nvmrc"
|
||||
- ".github/workflows/desktop-unit-test.yml"
|
||||
workflow_dispatch:
|
||||
|
||||
@@ -26,6 +37,6 @@ jobs:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version-file: "desktop/.nvmrc"
|
||||
node-version-file: ".nvmrc"
|
||||
- run: npm ci
|
||||
- run: npm run test:unit
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
name: explorer-build
|
||||
# Only explorer changes, or changes to this workflow, run it. Rust-only
|
||||
# changes don't affect the web app: its tests run against a pinned, pre-built
|
||||
# radicle-httpd.
|
||||
# Only explorer, shared/ui and root npm changes, or changes to this workflow,
|
||||
# run it. Rust-only changes don't affect the web app: its tests run against a
|
||||
# pinned, pre-built radicle-httpd.
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "explorer/**"
|
||||
- "shared/**"
|
||||
- "package.json"
|
||||
- "package-lock.json"
|
||||
- ".npmrc"
|
||||
- ".nvmrc"
|
||||
- "!explorer/crates/**"
|
||||
- "!explorer/Cargo.toml"
|
||||
- "!explorer/Cargo.lock"
|
||||
@@ -29,7 +34,7 @@ jobs:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version-file: "explorer/.nvmrc"
|
||||
node-version-file: ".nvmrc"
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Install Playwright Browsers
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
name: explorer-check
|
||||
# Only explorer changes, or changes to this workflow, run it. Rust-only
|
||||
# changes don't affect the web app: its tests run against a pinned, pre-built
|
||||
# radicle-httpd.
|
||||
# Only explorer, shared/ui and root npm changes, or changes to this workflow,
|
||||
# run it. Rust-only changes don't affect the web app: its tests run against a
|
||||
# pinned, pre-built radicle-httpd.
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "explorer/**"
|
||||
- "shared/**"
|
||||
- "package.json"
|
||||
- "package-lock.json"
|
||||
- ".npmrc"
|
||||
- ".nvmrc"
|
||||
- "!explorer/crates/**"
|
||||
- "!explorer/Cargo.toml"
|
||||
- "!explorer/Cargo.lock"
|
||||
@@ -29,6 +34,6 @@ jobs:
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version-file: "explorer/.nvmrc"
|
||||
node-version-file: ".nvmrc"
|
||||
- run: npm ci
|
||||
- run: npm run check
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
name: explorer-e2e
|
||||
# Only explorer changes, or changes to this workflow, run it. Rust-only
|
||||
# changes don't affect the web app: its tests run against a pinned, pre-built
|
||||
# radicle-httpd.
|
||||
# Only explorer, shared/ui and root npm changes, or changes to this workflow,
|
||||
# run it. Rust-only changes don't affect the web app: its tests run against a
|
||||
# pinned, pre-built radicle-httpd.
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "explorer/**"
|
||||
- "shared/**"
|
||||
- "package.json"
|
||||
- "package-lock.json"
|
||||
- ".npmrc"
|
||||
- ".nvmrc"
|
||||
- "!explorer/crates/**"
|
||||
- "!explorer/Cargo.toml"
|
||||
- "!explorer/Cargo.lock"
|
||||
@@ -29,7 +34,7 @@ jobs:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version-file: "explorer/.nvmrc"
|
||||
node-version-file: ".nvmrc"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
@@ -39,7 +44,7 @@ jobs:
|
||||
id: playwright-dep-cache
|
||||
with:
|
||||
path: ~/.cache/ms-playwright
|
||||
key: ${{ runner.os }}-playwright-${{ hashFiles('explorer/package-lock.json') }}
|
||||
key: ${{ runner.os }}-playwright-${{ hashFiles('package-lock.json') }}
|
||||
|
||||
- name: Install Playwright browsers
|
||||
if: steps.playwright-dep-cache.outputs.cache-hit != 'true'
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
name: explorer-http-client-unit-test
|
||||
# Only explorer changes, or changes to this workflow, run it. Rust-only
|
||||
# changes don't affect the web app: its tests run against a pinned, pre-built
|
||||
# radicle-httpd.
|
||||
# Only explorer, shared/ui and root npm changes, or changes to this workflow,
|
||||
# run it. Rust-only changes don't affect the web app: its tests run against a
|
||||
# pinned, pre-built radicle-httpd.
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "explorer/**"
|
||||
- "shared/**"
|
||||
- "package.json"
|
||||
- "package-lock.json"
|
||||
- ".npmrc"
|
||||
- ".nvmrc"
|
||||
- "!explorer/crates/**"
|
||||
- "!explorer/Cargo.toml"
|
||||
- "!explorer/Cargo.lock"
|
||||
@@ -30,7 +35,7 @@ jobs:
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version-file: "explorer/.nvmrc"
|
||||
node-version-file: ".nvmrc"
|
||||
- run: npm ci
|
||||
- name: Install Radicle binaries
|
||||
run: |
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
name: explorer-unit-test
|
||||
# Only explorer changes, or changes to this workflow, run it. Rust-only
|
||||
# changes don't affect the web app: its tests run against a pinned, pre-built
|
||||
# radicle-httpd.
|
||||
# Only explorer, shared/ui and root npm changes, or changes to this workflow,
|
||||
# run it. Rust-only changes don't affect the web app: its tests run against a
|
||||
# pinned, pre-built radicle-httpd.
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "explorer/**"
|
||||
- "shared/**"
|
||||
- "package.json"
|
||||
- "package-lock.json"
|
||||
- ".npmrc"
|
||||
- ".nvmrc"
|
||||
- "!explorer/crates/**"
|
||||
- "!explorer/Cargo.toml"
|
||||
- "!explorer/Cargo.lock"
|
||||
@@ -30,6 +35,6 @@ jobs:
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version-file: "explorer/.nvmrc"
|
||||
node-version-file: ".nvmrc"
|
||||
- run: npm ci
|
||||
- run: npm run test:unit
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
name: explorer-visual
|
||||
# Only explorer changes, or changes to this workflow, run it. Rust-only
|
||||
# changes don't affect the web app: its tests run against a pinned, pre-built
|
||||
# radicle-httpd.
|
||||
# Only explorer, shared/ui and root npm changes, or changes to this workflow,
|
||||
# run it. Rust-only changes don't affect the web app: its tests run against a
|
||||
# pinned, pre-built radicle-httpd.
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "explorer/**"
|
||||
- "shared/**"
|
||||
- "package.json"
|
||||
- "package-lock.json"
|
||||
- ".npmrc"
|
||||
- ".nvmrc"
|
||||
- "!explorer/crates/**"
|
||||
- "!explorer/Cargo.toml"
|
||||
- "!explorer/Cargo.lock"
|
||||
@@ -45,7 +50,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version-file: "explorer/.nvmrc"
|
||||
node-version-file: ".nvmrc"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
name: shared-ui
|
||||
# Only shared/ui changes, root npm changes, or changes to this workflow, run it.
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- "shared/**"
|
||||
- "package.json"
|
||||
- "package-lock.json"
|
||||
- ".npmrc"
|
||||
- ".nvmrc"
|
||||
- ".github/workflows/shared-ui.yml"
|
||||
push:
|
||||
paths:
|
||||
- "shared/**"
|
||||
- "package.json"
|
||||
- "package-lock.json"
|
||||
- ".npmrc"
|
||||
- ".nvmrc"
|
||||
- ".github/workflows/shared-ui.yml"
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: shared/ui
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
- run: npm ci
|
||||
- run: npm run check
|
||||
- run: npm run test:unit
|
||||
Reference in New Issue
Block a user