From 4f44f3c18f1e3c79c5959d12db43b0f12b3f5cb8 Mon Sep 17 00:00:00 2001 From: Harry Hogg Date: Sat, 24 Feb 2024 12:43:36 +0000 Subject: [PATCH] Add actions step to install wasm-pack --- .github/workflows/main.yml | 4 ++++ README.md | 1 + package.json | 1 + 3 files changed, 6 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e4332e6a..46b155b2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,6 +19,10 @@ jobs: run: yarn - name: 'Install dependencies: Rust' run: cargo fetch + - name: 'Install dependencies: wasm-pack' + run: cargo install wasm-pack + - name: 'Install dependencies: wasm32-unknown-unknown' + run: rustup target add wasm32-unknown-unknown - name: 'Build' run: yarn build - name: 'Lint' diff --git a/README.md b/README.md index 96de29ec..ab6c814b 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ ### Setup 1. [Install Rust (recommended through rustup)](https://rustup.rs/) +1. [Install wasm-pack](https://rustwasm.github.io/wasm-pack/installer/) 1. [Install Node (recommended through NVM)](https://github.com/nvm-sh/nvm) 1. Install Yarn -> `npm i yarn -g` 1. Clone this repo -> `git clone git@github.com:HHogg/hogg.io.git` diff --git a/package.json b/package.json index 4e8edcff..c1dc60ac 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "lint:rust": "yarn lint:rust:clippy && yarn lint:rust:fmt", "lint:rust:clippy": "cargo clippy --all-targets --all-features -- -D warnings", "lint:rust:fmt": "cargo fmt --all -- --check", + "test": "yarn test:rust", "test:rust": "cargo watch -x \"test -- --test-threads=1\"", "test:rust:clean": "cargo insta test --unreferenced=delete", "test:rust:review": "cargo insta review --include-ignored",