Update github actions: Add cargo fmt and fix clippy checks #40
This file contains hidden or 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: Rust Checks | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build | |
run: cargo build --examples --verbose | |
- name: Clippy | |
run: cargo clippy -- -D warnings | |
- name: Clippy Examples | |
run: cargo clippy --examples -- -D warnings | |
- name: rustfmt | |
run: cargo fmt --check | |
- name: Run tests | |
run: cargo test --verbose |