chore: improve the codebase #38
Workflow file for this run
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: CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main, release-*] | |
pull_request: | |
branches: [main, release-*] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
ci: | |
name: CI | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Fmt | |
run: cargo fmt --check | |
- name: Config wasm environment | |
run: rustup target add wasm32-unknown-unknown | |
- name: Clippy | |
run: cargo clippy --target wasm32-unknown-unknown --all-features -- -D warnings | |
- name: Install wasm-pack | |
run: cargo install wasm-pack | |
- name: Test | |
run: | | |
cargo test --no-default-features --features strsim | |
wasm-pack test --headless --firefox --all-features | |
- name: Build | |
run: | | |
wasm-pack build --debug --all-features |