11
11
env :
12
12
CARGO_TERM_COLOR : always
13
13
CARGO_REGISTRIES_CRATES_IO_PROTOCOL : sparse
14
- RUST_VERSION_MSRV : " 1.81.0"
15
- RUST_VERSION_STABLE : " stable"
14
+ RUST_VERSION_OLD : " 1.81.0" # aka MSRV
15
+ RUST_VERSION_NEW : " stable"
16
16
17
17
jobs :
18
18
tests :
19
19
strategy :
20
20
fail-fast : false
21
21
matrix :
22
- rust_version : [ "RUST_VERSION_MSRV ", "RUST_VERSION_STABLE " ]
22
+ rust_version : [ "RUST_VERSION_OLD ", "RUST_VERSION_NEW " ]
23
23
24
24
services :
25
25
ydb :
46
46
uses : Swatinem/rust-cache@v2
47
47
48
48
- name : Install nightly rust
49
- if : matrix.rust_version == 'RUST_VERSION_STABLE '
49
+ if : matrix.rust_version == 'RUST_VERSION_NEW '
50
50
uses : dtolnay/rust-toolchain@nightly
51
51
with :
52
52
components : clippy, rustfmt
@@ -69,31 +69,33 @@ jobs:
69
69
echo "name=version::$(rustc --version | cut -d ' ' -f 2)" >> $GITHUB_OUTPUT
70
70
71
71
- name : Cargo install
72
- if : matrix.rust_version == 'RUST_VERSION_STABLE '
72
+ if : matrix.rust_version == 'RUST_VERSION_NEW '
73
73
run : cargo install --locked cargo-sort cargo-udeps cargo-audit cargo-pants
74
74
75
75
- name : Rustfmt check
76
- if : matrix.rust_version == 'RUST_VERSION_STABLE '
76
+ if : matrix.rust_version == 'RUST_VERSION_NEW '
77
77
run : cargo fmt --check
78
78
79
79
- name : Cargo sort check
80
- if : matrix.rust_version == 'RUST_VERSION_STABLE '
80
+ if : matrix.rust_version == 'RUST_VERSION_NEW '
81
81
run : cargo sort --workspace --check
82
82
83
83
- name : Cargo udeps check
84
- if : matrix.rust_version == 'RUST_VERSION_STABLE '
84
+ if : matrix.rust_version == 'RUST_VERSION_NEW '
85
85
run : cargo +nightly udeps --all-targets
86
86
87
87
- name : Security check
88
- if : matrix.rust_version == 'RUST_VERSION_STABLE'
89
- run : cargo audit && cargo pants
88
+ if : matrix.rust_version == 'RUST_VERSION_NEW'
89
+ run : |
90
+ cargo audit
91
+ cargo pants
90
92
91
93
- name : Run tests
92
94
env :
93
95
YDB_CONNECTION_STRING : grpc://localhost:2136?database=/local
94
96
run : cargo test --verbose --workspace -- --include-ignored
95
97
96
98
- name : Linter
97
- if : matrix.rust_version == 'RUST_VERSION_STABLE '
99
+ if : matrix.rust_version == 'RUST_VERSION_NEW '
98
100
run : |
99
101
cargo clippy --workspace --all-targets --no-deps --exclude=ydb-grpc -- -D warnings
0 commit comments