Skip to content

Commit

Permalink
Check min versions of transitive depencencies in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
nepalez committed Sep 29, 2023
1 parent 73e0aa2 commit 0cf9b1d
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,3 +210,32 @@ jobs:

- name: Check spelling
run: cargo spellcheck --code 1

check_min_versions:
name: check minimal versions of transitive dependencies
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') }}
save-if: false # we are only checking examples, so we don't have the full build to be cached.
- 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

0 comments on commit 0cf9b1d

Please sign in to comment.