general code check #19
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: general code check | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
jobs: | |
test: | |
name: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Run tests | |
run: cargo test --release --features parallel | |
fmt: | |
name: fmt | |
runs-on: ubuntu-latest | |
env: | |
RUSTFLAGS: -Dwarnings # fails on warnings as well | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- name: enforce formatting | |
run: cargo fmt --check | |
clippy: | |
name: clippy | |
runs-on: ubuntu-latest | |
env: | |
RUSTFLAGS: -Dwarnings # fails on warnings as well | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- name: linting | |
run: cargo clippy --tests --examples --all-features |