mirror of
https://github.com/containers/bootc.git
synced 2026-02-05 06:45:13 +01:00
build-sys: Add make validate-rust
The `make validate-rust` reproduces locally the same checks we run in CI as gating by default; hook it up to the existing `make validate`. Signed-off-by: Colin Walters <walters@verbum.org>
This commit is contained in:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -48,7 +48,7 @@ jobs:
|
||||
- name: Manpage generation
|
||||
run: mkdir -p target/man && cargo run --features=docgen -- man --directory target/man
|
||||
- name: Clippy (gate on correctness and suspicous)
|
||||
run: cargo clippy -- -D clippy::correctness -D clippy::suspicious
|
||||
run: make validate-rust
|
||||
fedora-container-tests:
|
||||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'control/skip-ci') }}
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
@@ -85,6 +85,11 @@ For some bootc install commands, it's simpler to run the lldb-server in a contai
|
||||
sudo podman run --pid=host --network=host --privileged --security-opt label=type:unconfined_t -v /var/lib/containers:/var/lib/containers -v /dev:/dev -v .:/output localhost/bootc-lldb lldb-server platform --listen "*:1234" --server
|
||||
```
|
||||
|
||||
## Code linting
|
||||
|
||||
The `make validate` target runs checks locally that we gate on
|
||||
in CI, currently around `cargo fmt` and `cargo clippy`.
|
||||
|
||||
## Running the tests
|
||||
|
||||
First, you can run many unit tests with `cargo test`.
|
||||
|
||||
10
Makefile
10
Makefile
@@ -35,9 +35,13 @@ test-bin-archive: all
|
||||
test-tmt:
|
||||
cargo xtask test-tmt
|
||||
|
||||
validate:
|
||||
cargo fmt
|
||||
cargo clippy
|
||||
# Checks extra rust things (formatting and select clippy lints)
|
||||
validate-rust:
|
||||
cargo fmt -- --check -l
|
||||
cargo clippy -- -D clippy::correctness -D clippy::suspicious
|
||||
.PHONY: validate-rust
|
||||
|
||||
validate: validate-rust
|
||||
ruff check
|
||||
.PHONY: validate
|
||||
|
||||
|
||||
Reference in New Issue
Block a user