diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a44cb35..40b6615 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,10 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} cancel-in-progress: true +env: + # Minimum Supported Rust Version for backon + BACKON_MSRV: "1.70" + jobs: check: runs-on: ubuntu-latest @@ -22,6 +26,18 @@ jobs: - name: Clippy run: cargo clippy --all-features --all-targets -- -D warnings + msrv-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install + run: rustup toolchain install ${BACKON_MSRV} + - name: Check MSRV + run: cargo +${BACKON_MSRV} build + env: + RUST_LOG: DEBUG + RUST_BACKTRACE: full + unit: runs-on: ${{ matrix.os }} strategy: diff --git a/Cargo.toml b/Cargo.toml index 014c2e0..6156acd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,11 @@ [package] -authors = ["Xuanwo "] description = "Retry with backoff without effort." documentation = "https://docs.rs/backon" edition = "2021" license = "Apache-2.0" name = "backon" repository = "https://github.com/Xuanwo/backon" +rust-version = "1.70" version = "0.5.0" [package.metadata.docs.rs] @@ -18,8 +18,8 @@ targets = [ ] [features] -gloo-timers-sleep = ["dep:gloo-timers", "gloo-timers/futures"] -tokio-sleep = ["dep:tokio", "tokio/time"] +gloo-timers-sleep = ["dep:gloo-timers", "gloo-timers?/futures"] +tokio-sleep = ["dep:tokio", "tokio?/time"] [dependencies] fastrand = "2.0.0"