Skip to content

Commit 5ab72d7

Browse files
committed
Add MSRV minimal versions in CI
1 parent 5eecd0b commit 5ab72d7

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

.github/workflows/rust.yml

+15-4
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,20 @@ jobs:
4444
- name: Check code formatting
4545
run: cargo fmt --all -- --check
4646

47+
# this checks the msrv
48+
msrv:
49+
name: Verify MSRV
50+
runs-on: ubuntu-latest
51+
steps:
52+
- uses: actions/checkout@v4
53+
- uses: baptiste0928/cargo-install@v3
54+
with:
55+
crate: cargo-msrv
56+
- name: Verify minimum rust version of influxdb crate
57+
run: cargo msrv --path influxdb --output-format json verify
58+
- name: Verify minimum rust version of influxdb_derive crate
59+
run: cargo msrv --path influxdb_derive --output-format json verify
60+
4761
# this tests that all unit and doc tests are successful
4862
unit_tests:
4963
name: Unit and Doc Tests (Rust ${{matrix.rust.name}} on ${{matrix.os}})
@@ -53,9 +67,6 @@ jobs:
5367
fail-fast: false
5468
matrix:
5569
rust:
56-
- name: MSRV
57-
toolchain: "1.65"
58-
nightly: false
5970
- name: Stable
6071
toolchain: stable
6172
nightly: false
@@ -78,7 +89,7 @@ jobs:
7889
~/.cargo/git
7990
~/.cargo/registry
8091
target
81-
key: "${{runner.os}} Rust ${{steps.rust-toolchain.outputs.cachekey}}"
92+
key: "${{matrix.rust.toolchain}} on ${{runner.os}} Rust ${{steps.rust-toolchain.outputs.cachekey}}"
8293
- run: cargo test --lib
8394
- run: cargo test --doc
8495

influxdb/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ license = "MIT"
1111
readme = "README.md"
1212
include = ["src/**/*", "tests/**/*", "Cargo.toml", "LICENSE"]
1313
repository = "https://github.com/influxdb-rs/influxdb-rust"
14+
rust-version = "1.65"
1415

1516
[dependencies]
1617
chrono = { version = "0.4.23", features = ["serde"], default-features = false }

influxdb_derive/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ license = "MIT"
1111
readme = "README.md"
1212
include = ["src/**/*", "tests/**/*", "Cargo.toml", "LICENSE"]
1313
repository = "https://github.com/influxdb-rs/influxdb-rust"
14+
rust-version = "1.65"
1415

1516
[lib]
1617
proc-macro = true

0 commit comments

Comments
 (0)