mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 15:43:32 +01:00
CI: Add Rust tests and clippy
This adds a new "rust-latest" CI target that runs tests and clippy for everything in the workspace. It's a subset of the equivalent on Arti.
This commit is contained in:
parent
824e9c6e16
commit
41dac5e2d1
@ -253,3 +253,19 @@ debian-packaging-0.4.6:
|
|||||||
rules:
|
rules:
|
||||||
- if: $CI_PROJECT_NAMESPACE == "tpo/core" &&
|
- if: $CI_PROJECT_NAMESPACE == "tpo/core" &&
|
||||||
$CI_COMMIT_BRANCH == "maint-0.4.6"
|
$CI_COMMIT_BRANCH == "maint-0.4.6"
|
||||||
|
|
||||||
|
#####
|
||||||
|
# Run tests written in Rust, and run clippy on all Rust code here.
|
||||||
|
rust-latest:
|
||||||
|
image: rust:latest
|
||||||
|
<<: *debian-template
|
||||||
|
script:
|
||||||
|
- apt-get install llvm-dev libclang-dev clang
|
||||||
|
- rustup show
|
||||||
|
- cargo build --locked --verbose
|
||||||
|
- cargo test --verbose
|
||||||
|
- rustup component add clippy
|
||||||
|
- rustup show
|
||||||
|
- cargo clippy --all-features --all-targets -- -D warnings
|
||||||
|
after_script:
|
||||||
|
- cargo clean
|
4
changes/rust_ci
Normal file
4
changes/rust_ci
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
o Minor features (testing):
|
||||||
|
- All Rust code is now linted (cargo clippy) as part of GitLab CI,
|
||||||
|
and existing warnings have been fixed.
|
||||||
|
- Any unit tests written in Rust now run as part of GitLab CI.
|
Loading…
Reference in New Issue
Block a user