Skip to content

Commit 7932b3d

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

File tree

5 files changed

+42
-6
lines changed

5 files changed

+42
-6
lines changed

.github/workflows/msrv.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Check MSRV
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
test-min-rust-version:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v3
21+
- uses: baptiste0928/cargo-install@v2
22+
with:
23+
crate: cargo-msrv
24+
- name: Verify minimum rust version
25+
run: cargo-msrv --path influxdb verify

.github/workflows/rust.yml

+13-4
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,18 @@ 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 --workspace --output-format json verify
58+
4759
# this tests that all unit and doc tests are successful
4860
unit_tests:
4961
name: Unit and Doc Tests (Rust ${{matrix.rust.name}} on ${{matrix.os}})
@@ -53,9 +65,6 @@ jobs:
5365
fail-fast: false
5466
matrix:
5567
rust:
56-
- name: MSRV
57-
toolchain: "1.65"
58-
nightly: false
5968
- name: Stable
6069
toolchain: stable
6170
nightly: false
@@ -78,7 +87,7 @@ jobs:
7887
~/.cargo/git
7988
~/.cargo/registry
8089
target
81-
key: "${{runner.os}} Rust ${{steps.rust-toolchain.outputs.cachekey}}"
90+
key: "${{matrix.rust.toolchain}} on ${{runner.os}} Rust ${{steps.rust-toolchain.outputs.cachekey}}"
8291
- run: cargo test --lib
8392
- run: cargo test --doc
8493

README.j2

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
<a href="https://www.rust-lang.org/en-US/">
2626
<img src="https://img.shields.io/badge/Made%20with-Rust-orange.svg" alt='Build with Rust' />
2727
</a>
28-
<a href="https://blog.rust-lang.org/2022/11/03/Rust-1.65.0.html">
29-
<img src="https://img.shields.io/badge/rustc-1.65+-yellow.svg" alt='Minimum Rust Version: 1.65' />
28+
<a href="https://blog.rust-lang.org/2022/11/03/Rust-1.67.0.html">
29+
<img src="https://img.shields.io/badge/rustc-1.67+-yellow.svg" alt='Minimum Rust Version: 1.67' />
3030
</a>
3131
</p>
3232

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.67"
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.67"
1415

1516
[lib]
1617
proc-macro = true

0 commit comments

Comments
 (0)