Skip to content

Use --locked when cargo install #16

Use --locked when cargo install

Use --locked when cargo install #16

Workflow file for this run

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 --locked cargo-expand
cargo install --locked 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