ci: fix toolchain input name #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Rust | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| target: wasm32-unknown-unknown | |
| override: true | |
| - name: Install wasm-pack | |
| run: cargo install wasm-pack | |
| - name: Build WebAssembly | |
| run: wasm-pack build --target web --out-dir pkg | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 18 | |
| cache: 'npm' | |
| - name: npm ci & build | |
| run: | | |
| npm ci | |
| npm run build | |
| - name: Run Rust lints & tests | |
| run: | | |
| cargo fmt -- --check | |
| cargo clippy -- -D warnings | |
| # cargo test -- --nocapture |