Skip to content

Commit 1109697

Browse files
Switch webapp/ui-components/vercel workflows to slim #wasm-shell
Replaces `nix develop -c` (heavy default devshell) with `nix develop .#wasm-shell -c bash -c '...'`. .#wasm-shell has node + rust which is all the npm builds need (cargo wasm + svelte/ts compile). Saves the default devshell's full-toolchain startup. Drops the `rm -rf target` Cleanup steps inherited from the old prep-webapp.sh — disk-space hack that defeats cargo caching.
1 parent f53e16c commit 1109697

4 files changed

Lines changed: 32 additions & 24 deletions

File tree

.github/workflows/test-ui-components.yaml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,20 @@ jobs:
3636
# 1G = 1073741824
3737
gc-max-store-size-linux: 10G
3838
- run: |
39-
set -euxo pipefail
40-
nix develop -c npm run build -w @rainlanguage/raindex
41-
nix develop -c npm run build -w @rainlanguage/ui-components
42-
nix develop -c npm run build -w @rainlanguage/webapp
39+
nix develop .#wasm-shell -c bash -c '
40+
set -euxo pipefail
41+
npm install --no-check
42+
npm run build -w @rainlanguage/raindex
43+
npm run build -w @rainlanguage/ui-components
44+
npm run build -w @rainlanguage/webapp
45+
'
4346
env:
4447
PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }}
4548
COMMIT_SHA: ${{ github.sha }}
4649
CARGO_HOME: ${{ github.workspace }}/.cargo
4750
CARGO_TARGET_DIR: ${{ github.workspace }}/.cargo/target
48-
- name: Cleanup Rust artifacts after prep
49-
run: rm -rf target || true
50-
- run: nix develop -c npm run svelte-lint-format-check -w @rainlanguage/ui-components
51-
- run: nix develop -c npm run test -w @rainlanguage/ui-components
51+
- run: nix develop .#wasm-shell -c npm run svelte-lint-format-check -w @rainlanguage/ui-components
52+
- run: nix develop .#wasm-shell -c npm run test -w @rainlanguage/ui-components
5253
# check for npm package blacklists pkgs across all packages
5354
- uses: rainlanguage/github-chore/.github/actions/npm-blacklist@main
5455
- uses: rainlanguage/github-chore/.github/actions/npm-blacklist@main

.github/workflows/test-webapp.yaml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,22 @@ jobs:
3636
# 1G = 1073741824
3737
gc-max-store-size-linux: 10G
3838
- run: |
39-
set -euxo pipefail
40-
nix develop -c npm run build -w @rainlanguage/raindex
41-
nix develop -c npm run build -w @rainlanguage/ui-components
42-
nix develop -c npm run build -w @rainlanguage/webapp
39+
nix develop .#wasm-shell -c bash -c '
40+
set -euxo pipefail
41+
npm install --no-check
42+
npm run build -w @rainlanguage/raindex
43+
npm run build -w @rainlanguage/ui-components
44+
npm run build -w @rainlanguage/webapp
45+
'
4346
env:
4447
PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }}
4548
COMMIT_SHA: ${{ github.sha }}
4649
CARGO_HOME: ${{ github.workspace }}/.cargo
4750
CARGO_TARGET_DIR: ${{ github.workspace }}/.cargo/target
48-
- name: Cleanup Rust artifacts after prep
49-
run: rm -rf target || true
50-
- run: nix develop -c npm run svelte-lint-format-check -w @rainlanguage/webapp
51+
- run: nix develop .#wasm-shell -c npm run svelte-lint-format-check -w @rainlanguage/webapp
5152
env:
5253
PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }}
53-
- run: nix develop -c npm run test -w @rainlanguage/webapp
54+
- run: nix develop .#wasm-shell -c npm run test -w @rainlanguage/webapp
5455
env:
5556
PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }}
5657
# check for npm package blacklists pkgs across all packages

.github/workflows/vercel-preview.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,13 @@ jobs:
5252
# 1G = 1073741824
5353
gc-max-store-size-linux: 1G
5454
- run: |
55-
set -euxo pipefail
56-
nix develop -c npm run build -w @rainlanguage/raindex
57-
nix develop -c npm run build -w @rainlanguage/ui-components
58-
nix develop -c npm run build -w @rainlanguage/webapp
55+
nix develop .#wasm-shell -c bash -c '
56+
set -euxo pipefail
57+
npm install --no-check
58+
npm run build -w @rainlanguage/raindex
59+
npm run build -w @rainlanguage/ui-components
60+
npm run build -w @rainlanguage/webapp
61+
'
5962
env:
6063
PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID }}
6164
- run: nix develop .#webapp-shell -c npm run build

.github/workflows/vercel-prod.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,13 @@ jobs:
3535
# 1G = 1073741824
3636
gc-max-store-size-linux: 1G
3737
- run: |
38-
set -euxo pipefail
39-
nix develop -c npm run build -w @rainlanguage/raindex
40-
nix develop -c npm run build -w @rainlanguage/ui-components
41-
nix develop -c npm run build -w @rainlanguage/webapp
38+
nix develop .#wasm-shell -c bash -c '
39+
set -euxo pipefail
40+
npm install --no-check
41+
npm run build -w @rainlanguage/raindex
42+
npm run build -w @rainlanguage/ui-components
43+
npm run build -w @rainlanguage/webapp
44+
'
4245
env:
4346
PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID }}
4447
- run: nix develop .#webapp-shell -c npm run build

0 commit comments

Comments
 (0)