Improve dev env & CI setup

This commit is contained in:
Andras Schmelczer 2025-12-06 11:42:06 +00:00
parent 27ad42de2b
commit 38b39101ce
6 changed files with 24 additions and 32 deletions

View file

@ -2,7 +2,9 @@
set -e
which wasm-pack || cargo install wasm-pack
wasm-pack build --target web --features wasm
cd reconcile-js
npm ci
npm run build

View file

@ -25,8 +25,12 @@ else
fi
echo "Bumping versions"
which cargo-set-version || cargo install cargo-edit
cargo set-version --bump $1
which wasm-pack || cargo install wasm-pack
wasm-pack build --target web --features wasm
cd reconcile-js

View file

@ -2,6 +2,9 @@
set -e
which cargo-machete || cargo install cargo-machete
cargo machete
cargo clippy --all-targets --all-features --fix --allow-dirty --allow-staged
cargo fmt --all

View file

@ -2,6 +2,15 @@
set -e
which cargo-insta || cargo install cargo-insta
which wasm-pack || cargo install wasm-pack
node_version=$(node --version | cut -d'.' -f1 | tr -d 'v')
if [ "$node_version" != "22" ]; then
echo "Error: Node.js version 22 is required, but found version $node_version"
exit 1
fi
wasm-pack build --target web --features wasm,console_error_panic_hook
cargo test --verbose --features serde -- --include-ignored
@ -13,7 +22,8 @@ cargo test --features all
wasm-pack test --node --features wasm,console_error_panic_hook
cd reconcile-js
npm install
npm ci
npm run build
npm run test
cd -