clippy: fix warnings #302
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: [push, pull_request] | |
jobs: | |
ci: | |
name: ci | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- name: install rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: checkout repo | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: install rustfmt clippy | |
run: rustup component add rustfmt clippy | |
- name: check formatting | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
- name: check linting | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --all-targets --all-features -- -D warnings | |
- name: install cargo-llvm-cov | |
uses: taiki-e/install-action@cargo-llvm-cov | |
- name: run tests | |
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info | |
- name: run doc tests | |
run: cargo test --doc | |
- name: upload coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: lcov.info | |
- name: check doc | |
run: cargo doc | |
env: | |
RUSTFLAGS: -D warnings | |
- name: check cli formatting | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --manifest-path=cli/Cargo.toml --all -- --check | |
- name: check cli linting | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --manifest-path=cli/Cargo.toml --all-targets --all-features -- -D warnings | |
wasm: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
target: wasm32-unknown-emscripten | |
- name: Check | |
run: cargo check --target wasm32-unknown-emscripten |