Skip to content

Commit ea4d30d

Browse files
committed
CI: Lint the crate and examples
We are not currently running the linter in CI, do so.
1 parent f44943d commit ea4d30d

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

.github/workflows/rust.yml

+6
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
profile: minimal
1616
toolchain: nightly
1717
override: true
18+
- name: Install clippy
19+
run: rustup component add clippy
1820
- name: Running benchmarks
1921
env:
2022
DO_BENCH: true
@@ -27,6 +29,10 @@ jobs:
2729
env:
2830
DO_FMT: true
2931
run: ./contrib/test.sh
32+
- name: Running linter
33+
env:
34+
DO_LINT: true
35+
run: ./contrib/test.sh
3036

3137
Int-tests:
3238
name: Integration tests

contrib/test.sh

+15
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,21 @@ fi
3333
# Defaults / sanity checks
3434
cargo test
3535

36+
if [ "$DO_LINT" = true ]; then
37+
clippy="cargo +nightly clippy"
38+
39+
$clippy -- -D warnings
40+
41+
# Lint all the examples
42+
$clippy --example htlc --features=compiler -- -D warnings
43+
$clippy --example parse -- -D warnings
44+
$clippy --example sign_multisig -- -D warnings
45+
$clippy --example verify_tx -- -D warnings
46+
$clippy --example xpub_descriptors -- -D warnings
47+
$clippy --example taproot --features=compiler -- -D warnings
48+
$clippy --example psbt_sign_finalize --features=base64 -- -D warnings
49+
fi
50+
3651
if [ "$DO_FEATURE_MATRIX" = true ]
3752
then
3853
# All features

0 commit comments

Comments
 (0)