Skip to content

Commit

Permalink
chore(ci): Add CI for checking minimal versions
Browse files Browse the repository at this point in the history
Catch if we have under-specified any semver dependency
  • Loading branch information
faern committed Jun 29, 2024
1 parent b3427ce commit 9b4fb26
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
permissions:
contents: none
name: CI
needs: [test, msrv, lockfile, docs, rustfmt, clippy]
needs: [test, msrv, lockfile, docs, rustfmt, clippy, minimal-versions]
runs-on: ubuntu-latest
if: "always()"
steps:
Expand Down Expand Up @@ -72,6 +72,27 @@ jobs:
run: cargo hack check --all-features --locked --rust-version --ignore-private --workspace --all-targets
- name: No-default features
run: cargo hack check --no-default-features --locked --rust-version --ignore-private --workspace --all-targets
# Make sure the library builds with all dependencies downgraded to their
# oldest versions allowed by the semver spec. This ensures we have not
# under-specified any dependency
minimal-versions:
name: Minimal versions
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install stable Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Install nightly Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
- name: Downgrade dependencies to minimal versions
run: cargo +nightly generate-lockfile -Z minimal-versions
- name: Compile with minimal versions
run: cargo +stable check --workspace --all-features --all-targets --locked
lockfile:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 9b4fb26

Please sign in to comment.