Bump the dev-dependencies group with 2 updates (#436) #580
This file contains 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: Node.js CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache cargo build | |
uses: actions/cache@v3 | |
with: | |
path: wasm/target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: ${{ runner.os }}-cargo | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
components: rustfmt, clippy | |
- name: Install wasm-pack | |
uses: jetli/[email protected] | |
with: | |
version: 'latest' | |
- name: Install cargo-deny | |
uses: baptiste0928/cargo-install@v2 | |
with: | |
crate: cargo-deny | |
version: "^0.14" | |
# `--force` flag is required because of pug@3 conflicting with pug-loader peer dependency. | |
# pug@3 works fine in practice. | |
- run: npm ci --force | |
# Rust-related checks | |
- name: Format | |
run: npm run lint:wasm:fmt | |
- name: Clippy | |
run: cargo clippy --manifest-path wasm/Cargo.toml --all-targets -- -D warnings | |
- name: Check dependencies | |
run: (cd wasm; cargo deny check) | |
- name: Tests | |
run: npm run test:wasm -- --chrome --firefox | |
# Front-end checks (`npm run build` should be the first one, it builds WASM) | |
- run: npm run build | |
- run: npm run lint:js | |
- run: npm run test:js |