From 40b14489f0cd6ada136f11ae7aceecced1a82f9d Mon Sep 17 00:00:00 2001 From: Mingun Date: Sun, 26 Feb 2023 22:31:12 +0500 Subject: [PATCH] Add workflow to check for minimal versions --- .github/workflows/rust.yml | 17 +++++++++++++++++ Cargo.toml | 6 ++++-- Changelog.md | 1 + 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 4d96b9a8..43a257f7 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -17,6 +17,23 @@ jobs: - uses: dtolnay/rust-toolchain@1.52.0 - run: cargo check + minimal-versions: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install tools + run: cargo install cargo-hack cargo-minimal-versions + - name: Install nightly rust + uses: dtolnay/rust-toolchain@nightly + - name: Check with minimal versions + run: cargo minimal-versions check + - name: Check with minimal versions (serialize) + run: cargo minimal-versions check --features serialize + - name: Check with minimal versions (encoding) + run: cargo minimal-versions check --features encoding + - name: Check with minimal versions (async-tokio) + run: cargo minimal-versions check --features async-tokio + test: strategy: matrix: diff --git a/Cargo.toml b/Cargo.toml index a9a70058..61157326 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,14 +17,16 @@ include = ["src/*", "LICENSE-MIT.md", "README.md"] document-features = { version = "0.2", optional = true } encoding_rs = { version = "0.8", optional = true } serde = { version = "1.0.100", optional = true } -tokio = { version = "1.0", optional = true, default-features = false, features = ["io-util"] } +tokio = { version = "1.10", optional = true, default-features = false, features = ["io-util"] } memchr = "2.1" [dev-dependencies] criterion = "0.4" pretty_assertions = "1.3" regex = "1" -serde = { version = "1.0", features = ["derive"] } +# #[serde(other)] allowed not only inside field_identifier since 1.0.79 +# serde does not follow semver in numbering and their dependencies, so we specifying patch here +serde_derive = { version = "1.0.79" } serde-value = "0.7" tokio = { version = "1.21", default-features = false, features = ["macros", "rt"] } tokio-test = "0.4" diff --git a/Changelog.md b/Changelog.md index 96f7a8cb..26446ea0 100644 --- a/Changelog.md +++ b/Changelog.md @@ -35,6 +35,7 @@ The same behavior for the `Reader` does not implemented (yet?) and should be implemented manually - [#562]: Correctly set minimum required version of memchr dependency to 2.1 +- [#565]: Correctly set minimum required version of tokio dependency to 1.10 - [#565]: Fix compilation error when build with serde <1.0.139 ### Misc Changes