chore: declare and check MSRV (#1034)
* chore: declare and check MSRV * fix: clippy fixes for collapsing if-statements * ci: add explicit contents read permission to MSRV job
This commit is contained in:
parent
e660b805ee
commit
76988023b2
1 changed files with 322 additions and 315 deletions
24
.github/workflows/ci.yml
vendored
24
.github/workflows/ci.yml
vendored
|
|
@ -205,6 +205,30 @@ jobs:
|
|||
- name: Spell Check Repo
|
||||
uses: crate-ci/typos@master
|
||||
|
||||
msrv:
|
||||
name: Check MSRV
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
|
||||
- name: Read MSRV from Cargo.toml
|
||||
run: |
|
||||
MSRV=$(cargo metadata --no-deps --format-version 1 \
|
||||
| jq -r '.packages[] | select(.name == "rmcp") | .rust_version')
|
||||
echo "MSRV=$MSRV" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Install MSRV Rust
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: ${{ env.MSRV }}
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Check default workspace members with MSRV
|
||||
run: cargo +${{ env.MSRV }} check --all-targets --all-features
|
||||
|
||||
test:
|
||||
name: Run Tests
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
|||
Loading…
Reference in a new issue