Skip to content

Commit

Permalink
chore: Use Cargo metadata for the MSRV build job
Browse files Browse the repository at this point in the history
  • Loading branch information
nickelc authored and seanmonstar committed Apr 13, 2023
1 parent dd4c15c commit 3a2f3e0
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml
Expand Up @@ -18,9 +18,6 @@ jobs:
- stable
- beta
- nightly
# When updating this value, don't forget to also adjust the
# `rust-version` field in the `Cargo.toml` file.
- 1.49.0

include:
- rust: nightly
Expand Down Expand Up @@ -51,10 +48,16 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Install Rust
- name: Get MSRV from package metadata
id: metadata
run: |
cargo metadata --no-deps --format-version 1 |
jq -r '"msrv=" + (.packages[] | select(.name == "http")).rust_version' >> $GITHUB_OUTPUT
- name: Install Rust (${{ steps.metadata.outputs.msrv }})
uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.49"
toolchain: ${{ steps.metadata.outputs.msrv }}

- name: Test
run: cargo test -p http
Expand Down

0 comments on commit 3a2f3e0

Please sign in to comment.