Adding cargo fmt and cargo clippy into CI checks.
@@ -64,6 +64,26 @@ jobs:
- checkout
- run: cargo run --bin large_download
+ # Rust testing - Check formatting
+ # Run for all PR commits
+ rust_fmt:
+ docker:
+ - image: kubos/kubos-dev:latest
+ steps:
+ - checkout
+ - run: cargo fmt -- --check
+
+
+ # Rust testing - Clippy linter
+ # Run for all PR commits
+ rust_clippy:
+ docker:
+ - image: kubos/kubos-dev:latest
+ steps:
+ - checkout
+ - run: cargo clippy
+
+
# CLI, C and Python testing
# Run for all PR commits
non_rust_tests:
@@ -127,6 +147,14 @@ workflows:
filters:
branches:
ignore: master
+ - rust_fmt:
+ filters:
+ branches:
+ ignore: master
+ - rust_clippy:
+ filters:
+ branches:
+ ignore: master
- non_rust_tests:
filters:
branches:
