Clippy #10
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: Rust | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
schedule: | |
- cron: '10 14 * * 6' | |
env: | |
CARGO_TERM_COLOR: always | |
RUSTFLAGS: --deny warnings | |
RUSTDOCFLAGS: --deny warnings | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
# https://doc.rust-lang.org/cargo/guide/continuous-integration.html | |
strategy: | |
fail-fast: false | |
matrix: | |
toolchain: | |
- stable | |
- '1.74.1' # 2023-12-07, meant to be about 1 year ago | |
- beta | |
- nightly | |
steps: | |
- uses: actions/checkout@v4 | |
- name: setup ${{ matrix.toolchain }} | |
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | |
- name: cargo version | |
run: cargo --version | |
- name: Install tools | |
run: | | |
rustup component add clippy rustfmt | |
cargo install cargo-expand | |
cargo install cargo-bloat | |
- name: Build | |
run: cargo build --verbose | |
- name: Run tests | |
run: cargo test --verbose --locked --all --all-features | |
- name: Run clippy | |
run: cargo clippy --all-targets --locked --all | |
- name: Check formatting | |
run: cargo fmt -- --check | |
- name: Document | |
run: cargo doc --verbose | |
- name: cargo expand | |
run: cargo expand --lib | wc | |
- name: cargo bloat | |
run: cargo bloat --release |