Skip to content

feat(ci): add a format and msrv step #137

feat(ci): add a format and msrv step

feat(ci): add a format and msrv step #137

Workflow file for this run

name: Rust
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt --all -- --check
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --all-features --workspace
msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Get MSRV from package metadata
id: msrv
run: grep rust-version Cargo.toml | cut -d'"' -f2 | sed 's/^/version=/' >> $GITHUB_OUTPUT
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ steps.msrv.outputs.version }}
components: rustfmt, clippy
- name: check crates
run: cargo check --all-features