@@ -21,61 +21,69 @@ jobs:
21
21
timeout-minutes : 60
22
22
steps :
23
23
- uses : actions/checkout@v3
24
- - name : Update rust toolchain
25
- run : rustup update
24
+ - name : Setup rust toolchain
25
+ uses : actions-rust-lang/setup-rust-toolchain@v1
26
+ with :
27
+ components : clippy, rustfmt
26
28
- name : Print rustc version
27
29
run : rustc --version
28
30
- name : Print rustfmt version
29
31
run : cargo fmt --version
30
32
- name : Print clippy version
31
33
run : cargo clippy --version
34
+
35
+ # Formatting
32
36
- name : Format check
33
37
run : cargo fmt --all -- --check
38
+
39
+ # Basic clippy checks
34
40
- name : Clippy check
35
41
run : cargo clippy --all-targets
36
42
- name : Clippy check with all features
37
43
run : cargo clippy --all-targets --all-features
44
+
45
+ # Verify scylla-cql separately
46
+ - name : Clippy scylla-cql
47
+ run : cargo clippy --all-targets -p scylla-cql --features "full-serialization"
48
+
49
+ # cpp-rust-driver special cfg
38
50
- name : Cargo check with cpp_rust_unstable cfg
39
- run : RUSTFLAGS="--cfg cpp_rust_unstable" cargo clippy --all-targets --all-features
51
+ run : RUSTFLAGS="--cfg cpp_rust_unstable -Dwarnings " cargo clippy --all-targets --all-features
40
52
41
53
# Features checks.
42
54
# No features.
43
55
- name : Cargo check without features
44
- run : cargo check --all-targets --manifest-path " scylla/Cargo.toml" --features ""
56
+ run : cargo check --all-targets -p scylla --features ""
45
57
46
58
# All features.
47
59
- name : Cargo check with all features
48
- run : cargo check --all-targets --manifest-path " scylla/Cargo.toml" --all-features
60
+ run : cargo check --all-targets -p scylla --all-features
49
61
50
62
# Various (de)serialization features.
51
63
- name : Cargo check with all serialization features
52
- run : cargo check --all-targets --manifest-path " scylla/Cargo.toml" --features "full-serialization"
64
+ run : cargo check --all-targets -p scylla --features "full-serialization"
53
65
- name : Cargo check with metrics feature
54
- run : cargo check --all-targets --manifest-path " scylla/Cargo.toml" --features "metrics"
66
+ run : cargo check --all-targets -p scylla --features "metrics"
55
67
- name : Cargo check with secrecy-08 feature
56
- run : cargo check --all-targets --manifest-path " scylla/Cargo.toml" --features "secrecy-08"
68
+ run : cargo check --all-targets -p scylla --features "secrecy-08"
57
69
- name : Cargo check with chrono-04 feature
58
- run : cargo check --all-targets --manifest-path " scylla/Cargo.toml" --features "chrono-04"
70
+ run : cargo check --all-targets -p scylla --features "chrono-04"
59
71
- name : Cargo check with time-03 feature
60
- run : cargo check --all-targets --manifest-path " scylla/Cargo.toml" --features "time-03"
72
+ run : cargo check --all-targets -p scylla --features "time-03"
61
73
- name : Cargo check with num-bigint-03 feature
62
- run : cargo check --all-targets --manifest-path " scylla/Cargo.toml" --features "num-bigint-03"
74
+ run : cargo check --all-targets -p scylla --features "num-bigint-03"
63
75
- name : Cargo check with num-bigint-04 feature
64
- run : cargo check --all-targets --manifest-path " scylla/Cargo.toml" --features "num-bigint-04"
76
+ run : cargo check --all-targets -p scylla --features "num-bigint-04"
65
77
- name : Cargo check with bigdecimal-04 feature
66
- run : cargo check --all-targets --manifest-path " scylla/Cargo.toml" --features "bigdecimal-04"
78
+ run : cargo check --all-targets -p scylla --features "bigdecimal-04"
67
79
68
80
# TLS-related feature sets.
69
81
- name : Cargo check with openssl-x feature
70
- run : cargo check --all-targets --manifest-path " scylla/Cargo.toml" --features "openssl-010"
82
+ run : cargo check --all-targets -p scylla --features "openssl-010"
71
83
- name : Cargo check with rustls-x feature
72
- run : cargo check --all-targets --manifest-path " scylla/Cargo.toml" --features "rustls-023"
84
+ run : cargo check --all-targets -p scylla --features "rustls-023"
73
85
# (openssl-x, rustls-x) is checked in tls.yml.
74
86
75
- - name : Build scylla-cql
76
- run : cargo build --all-targets --manifest-path "scylla-cql/Cargo.toml" --features "full-serialization"
77
- - name : Build
78
- run : cargo build --all-targets --features "full-serialization"
79
87
tests :
80
88
runs-on : ubuntu-latest
81
89
timeout-minutes : 60
@@ -85,13 +93,12 @@ jobs:
85
93
run : |
86
94
sudo sh -c "echo 2097152 >> /proc/sys/fs/aio-max-nr"
87
95
docker compose -f test/cluster/docker-compose.yml up -d --wait
88
- - name : Update rust toolchain
89
- run : rustup update
96
+ - name : Setup rust toolchain
97
+ uses : actions-rust-lang/setup-rust-toolchain@v1
90
98
- name : Print rustc version
91
99
run : rustc --version
92
100
- name : Run tests
93
101
run : |
94
- cargo clean
95
102
RUST_LOG=trace SCYLLA_URI=172.42.0.2:9042 SCYLLA_URI2=172.42.0.3:9042 SCYLLA_URI3=172.42.0.4:9042 cargo test --features "full-serialization"
96
103
- name : Stop the cluster
97
104
if : ${{ always() }}
@@ -108,26 +115,26 @@ jobs:
108
115
steps :
109
116
- uses : actions/checkout@v3
110
117
- name : Install Rust ${{ env.rust_min }}
111
- run : |
112
- rustup install ${{ env.rust_min }}
113
- rustup override set ${{ env.rust_min }}
118
+ uses : actions-rust-lang/setup-rust-toolchain@v1
119
+ with :
120
+ toolchain : ${{ env.rust_min }}
114
121
- name : Print Rust version
115
122
run : rustc --version
116
123
- name : Use MSRV Cargo.lock
117
124
run : mv Cargo.lock.msrv Cargo.lock
118
125
- name : MSRV cargo check with features
119
126
run : cargo check --all-targets --all-features --locked
120
127
- name : MSRV cargo check without features
121
- run : cargo check --all-targets --locked --manifest-path " scylla/Cargo.toml"
128
+ run : cargo check --all-targets --locked -p scylla
122
129
- name : MSRV cargo check scylla-cql
123
- run : cargo check --all-targets --locked --manifest-path " scylla-cql/Cargo.toml"
130
+ run : cargo check --all-targets --locked -p scylla-cql
124
131
125
132
# Tests that docstrings generate docs without warnings
126
133
cargo_docs :
127
134
runs-on : ubuntu-latest
128
135
steps :
129
136
- uses : actions/checkout@v3
130
- - name : Update rust toolchain
131
- run : rustup update
137
+ - name : Setup rust toolchain
138
+ uses : actions-rust-lang/setup-rust-toolchain@v1
132
139
- name : Compile docs
133
140
run : RUSTDOCFLAGS=-Dwarnings cargo doc
0 commit comments