|
|
|
name: build
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
fmt:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- run: rustup update
|
|
|
|
- run: rustup component add rustfmt
|
|
|
|
- run: cargo fmt -- --check
|
|
|
|
|
|
|
|
clippy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- run: rustup update
|
|
|
|
- run: rustup component add clippy
|
|
|
|
- run: cargo clippy --all --all-targets
|
|
|
|
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- run: rustup update
|
|
|
|
- run: cargo build
|
|
|
|
- run: cargo test --verbose --all
|
|
|
|
env:
|
|
|
|
RUST_BACKTRACE: 1
|
|
|
|
|
|
|
|
wasm:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- run: rustup update
|
|
|
|
- run: cargo install wasm-pack
|
|
|
|
- run: wasm-pack test --node lib
|
|
|
|
- run: wasm-pack test --node js
|
|
|
|
|
|
|
|
js:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- run: rustup update
|
|
|
|
- run: cargo install wasm-pack
|
|
|
|
- run: npm install
|
|
|
|
working-directory: ./js
|
|
|
|
- run: npm test
|
|
|
|
working-directory: ./js
|