diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e92f30a..3f2caee0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: @@ -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: