Skip to content

fix: SHA-pin dtolnay/rust-toolchain action #14

fix: SHA-pin dtolnay/rust-toolchain action

fix: SHA-pin dtolnay/rust-toolchain action #14

Workflow file for this run

# SPDX-License-Identifier: PMPL-1.0-or-later
name: Rust CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
contents: read
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 # stable
with:
toolchain: stable
components: rustfmt, clippy
- name: Cache cargo registry
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
- name: Check formatting
run: cargo fmt -- --check
- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Build release
run: cargo build --release --verbose
- name: Check for warnings
run: |
OUTPUT=$(cargo build --release 2>&1)
if echo "$OUTPUT" | grep -i "warning"; then
echo "❌ Build produced warnings:"
echo "$OUTPUT" | grep -i "warning"
exit 1
fi
echo "✅ Zero warnings"
msrv:
name: Check MSRV (1.85.0)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Install Rust 1.85.0
uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 # stable
with:
toolchain: 1.85.0
- name: Cache cargo registry
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
- name: Check build
run: cargo check --all-features