Skip to content

Commit

Permalink
Add MSRV minimal versions in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Empty2k12 committed Dec 13, 2024
1 parent 5eecd0b commit 359fd08
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,20 @@ jobs:
- name: Check code formatting
run: cargo fmt --all -- --check

# this checks the msrv
msrv:
name: Verify MSRV
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: baptiste0928/cargo-install@v3
with:
crate: cargo-msrv
- name: Verify minimum rust version of influxdb crate
run: cargo msrv --path influxdb --output-format json verify
- name: Verify minimum rust version of influxdb_derive crate
run: cargo msrv --path influxdb_derive --output-format json verify

# this tests that all unit and doc tests are successful
unit_tests:
name: Unit and Doc Tests (Rust ${{matrix.rust.name}} on ${{matrix.os}})
Expand All @@ -53,9 +67,6 @@ jobs:
fail-fast: false
matrix:
rust:
- name: MSRV
toolchain: "1.65"
nightly: false
- name: Stable
toolchain: stable
nightly: false
Expand All @@ -78,7 +89,7 @@ jobs:
~/.cargo/git
~/.cargo/registry
target
key: "${{runner.os}} Rust ${{steps.rust-toolchain.outputs.cachekey}}"
key: "${{matrix.rust.toolchain}} on ${{runner.os}} Rust ${{steps.rust-toolchain.outputs.cachekey}}"
- run: cargo test --lib
- run: cargo test --doc

Expand Down
4 changes: 2 additions & 2 deletions README.j2
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
<a href="https://www.rust-lang.org/en-US/">
<img src="https://img.shields.io/badge/Made%20with-Rust-orange.svg" alt='Build with Rust' />
</a>
<a href="https://blog.rust-lang.org/2022/11/03/Rust-1.65.0.html">
<img src="https://img.shields.io/badge/rustc-1.65+-yellow.svg" alt='Minimum Rust Version: 1.65' />
<a href="https://blog.rust-lang.org/2022/11/03/Rust-1.67.0.html">
<img src="https://img.shields.io/badge/rustc-1.67+-yellow.svg" alt='Minimum Rust Version: 1.67' />
</a>
</p>

Expand Down
1 change: 1 addition & 0 deletions influxdb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ license = "MIT"
readme = "README.md"
include = ["src/**/*", "tests/**/*", "Cargo.toml", "LICENSE"]
repository = "https://github.com/influxdb-rs/influxdb-rust"
rust-version = "1.70"

[dependencies]
chrono = { version = "0.4.23", features = ["serde"], default-features = false }
Expand Down
1 change: 1 addition & 0 deletions influxdb_derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ license = "MIT"
readme = "README.md"
include = ["src/**/*", "tests/**/*", "Cargo.toml", "LICENSE"]
repository = "https://github.com/influxdb-rs/influxdb-rust"
rust-version = "1.70"

[lib]
proc-macro = true
Expand Down

0 comments on commit 359fd08

Please sign in to comment.