mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-10-27 07:30:34 +08:00
Run ryph setup for explorer from explorer/
This commit is contained in:
+10
-9
@@ -1,8 +1,8 @@
|
||||
# radicle-gui environment
|
||||
|
||||
This repository holds two projects: the explorer web app and `radicle-httpd`
|
||||
at the root, and the desktop app in `desktop/`. Each has its own npm package
|
||||
and Cargo workspace.
|
||||
in `explorer/`, and the desktop app in `desktop/`. Each has its own npm
|
||||
package and Cargo workspace.
|
||||
|
||||
`.ryph/Dockerfile` is written as the machine for the whole Radicle
|
||||
workspace, and a workspace builds only its environment repository's
|
||||
@@ -21,18 +21,19 @@ is on. On top of the universal image it adds:
|
||||
override it, or every crate rebuilds.
|
||||
|
||||
`.ryph/setup.yml` installs the npm dependencies and the pinned Radicle
|
||||
binaries (`tests/tmp/bin`, `desktop/tests/tmp/bin`) for both projects,
|
||||
binaries (`explorer/tests/tmp/bin`, `desktop/tests/tmp/bin`) for both projects,
|
||||
Playwright's Chromium for the explorer and its WebKit for the desktop app.
|
||||
At image build it warms clippy and the Rust test builds of both workspaces,
|
||||
and the desktop e2e backend (`test-http-api`, `rad-job`), in `target/` and
|
||||
`desktop/target/`. At run start it only reinstalls what the lockfiles
|
||||
and the desktop e2e backend (`test-http-api`, `rad-job`), in
|
||||
`explorer/target/` and `desktop/target/`. At run start it only reinstalls what the lockfiles
|
||||
changed, and cargo builds what a command needs when it runs. Node 24.15.0
|
||||
(`.nvmrc`) and Rust 1.97.1 (`rust-toolchain`, `desktop/rust-toolchain.toml`)
|
||||
come from mise and rustup.
|
||||
(`explorer/.nvmrc`, `desktop/.nvmrc`) and Rust 1.97.1
|
||||
(`explorer/rust-toolchain`, `desktop/rust-toolchain.toml`) come from mise and
|
||||
rustup.
|
||||
|
||||
## Checks (what CI runs)
|
||||
|
||||
Explorer and `radicle-httpd`, from the repository root:
|
||||
Explorer and `radicle-httpd`, from `explorer/`:
|
||||
|
||||
```sh
|
||||
npm run check
|
||||
@@ -47,7 +48,7 @@ npm run test:e2e -- --project chromium
|
||||
```
|
||||
|
||||
`npm run check:ci` runs all of the explorer's checks in order, plus the build
|
||||
smoke test, and logs to `tests/tmp/check-ci.log`.
|
||||
smoke test, and logs to `explorer/tests/tmp/check-ci.log`.
|
||||
|
||||
Desktop, from `desktop/`:
|
||||
|
||||
|
||||
+12
-11
@@ -1,23 +1,24 @@
|
||||
steps:
|
||||
# Explorer and radicle-httpd, at the repository root.
|
||||
- name: install npm dependencies
|
||||
run: npm install --prefer-offline
|
||||
# Explorer and radicle-httpd, in explorer/. Each project is its own npm
|
||||
# package and Cargo workspace.
|
||||
- name: install explorer npm dependencies
|
||||
run: cd explorer && npm install --prefer-offline
|
||||
- name: install Playwright Chromium (explorer e2e)
|
||||
run: npx playwright install chromium
|
||||
run: cd explorer && npx playwright install chromium
|
||||
- name: install the pinned Radicle binaries for http-client and e2e tests
|
||||
run: ./scripts/install-binaries
|
||||
# The root's plain rust-toolchain pin installs with rustup's minimal
|
||||
run: explorer/scripts/install-binaries
|
||||
# Explorer's plain rust-toolchain pin installs with rustup's minimal
|
||||
# profile, which has no clippy or rustfmt.
|
||||
- name: add clippy and rustfmt to the pinned toolchain
|
||||
run: rustup component add clippy rustfmt
|
||||
run: cd explorer && rustup component add clippy rustfmt
|
||||
# The cargo warm steps only fill the image's target/ directories. At run
|
||||
# time cargo builds what a command needs when it runs, so a run that works
|
||||
# on another workspace member doesn't wait for two Rust workspaces.
|
||||
- name: warm clippy (explorer-rust lint, image builds only)
|
||||
run: '[ "$RYPH_SETUP_PHASE" != image ] || RUSTFLAGS="-D warnings" cargo clippy --workspace --all-features --tests --locked'
|
||||
run: 'cd explorer && { [ "$RYPH_SETUP_PHASE" != image ] || RUSTFLAGS="-D warnings" cargo clippy --workspace --all-features --tests --locked; }'
|
||||
- name: warm the Rust test build (explorer-rust test, image builds only)
|
||||
run: '[ "$RYPH_SETUP_PHASE" != image ] || cargo test --workspace --all-features --no-run --locked'
|
||||
# desktop/ is its own npm package and Cargo workspace.
|
||||
run: 'cd explorer && { [ "$RYPH_SETUP_PHASE" != image ] || cargo test --workspace --all-features --no-run --locked; }'
|
||||
# Desktop, in desktop/.
|
||||
- name: install desktop npm dependencies
|
||||
run: cd desktop && npm install --prefer-offline
|
||||
- name: install Playwright WebKit (desktop e2e)
|
||||
@@ -33,4 +34,4 @@ steps:
|
||||
# rustc's incremental cache only speeds up rebuilding this repo's own
|
||||
# crates after an edit, and it is gigabytes. Image builds only.
|
||||
- name: drop the incremental caches (image builds only)
|
||||
run: '[ "$RYPH_SETUP_PHASE" != image ] || rm -rf target/debug/incremental desktop/target/debug/incremental'
|
||||
run: '[ "$RYPH_SETUP_PHASE" != image ] || rm -rf explorer/target/debug/incremental desktop/target/debug/incremental'
|
||||
|
||||
Reference in New Issue
Block a user