From 213c89bdc67e29609436c78c9103ba34188d7439 Mon Sep 17 00:00:00 2001 From: Andrew Kozin Date: Wed, 20 Sep 2023 17:59:30 +0100 Subject: [PATCH] Check min versions of transitive depencencies in CI --- .github/workflows/test.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 21f795fa2..209301e5b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -210,3 +210,31 @@ jobs: - name: Check spelling run: cargo spellcheck --code 1 + + check_min_versions: + name: check minimal versions of transitive dependencies (ubuntu-latest / stable) + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Install nightly for -Zminimal-versions + uses: dtolnay/rust-toolchain@nightly + - name: Lock minimal versions + # Update openssl-sys to not depend on the stale libssl-dev package. + run: | + cargo +nightly update -Zminimal-versions + cargo +nightly update -p openssl-sys -p openssl + + - name: Install stable + id: install-stable-rust + uses: dtolnay/rust-toolchain@stable + - name: Restore cached build artifacts + uses: Swatinem/rust-cache@v2 + with: + shared-key: ${{ runner.os }}-${{ steps.install-stable-rust.outputs.cachekey }}-${{ hashFiles('Cargo.lock') }} + - name: Run the check + env: + RUST_BACKTRACE: 1 + # cannot check against all packages because min versions of nats@0.16.0 are broken + run: cargo +${{ steps.install-stable-rust.outputs.name }} check --package async-nats --locked --all-features --all-targets