Skip to content

Commit 0be8c7c

Browse files
authored
Merge pull request #137 from encryption4all/ci/add-rust-quality-job
ci: add Rust quality job (fmt, clippy, test)
2 parents a058c3d + 0ae20f9 commit 0be8c7c

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,27 @@ on:
1717

1818
jobs:
1919

20+
# Rust quality gate: fmt, clippy, tests. Runs on every PR and on push to
21+
# main, in parallel to the release-plz/Docker pipeline (does not block it).
22+
quality:
23+
name: Rust quality (fmt, clippy, test)
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v6
28+
- name: Install Rust toolchain
29+
uses: dtolnay/rust-toolchain@stable
30+
with:
31+
components: rustfmt, clippy
32+
- name: Cache cargo registry and target
33+
uses: Swatinem/rust-cache@v2
34+
- name: cargo fmt --check
35+
run: cargo fmt --all -- --check
36+
- name: cargo clippy
37+
run: cargo clippy --all-targets -- -D warnings
38+
- name: cargo test
39+
run: cargo test --all-targets
40+
2041
# Release unpublished packages.
2142
release-plz-release:
2243
name: Release-plz release

0 commit comments

Comments
 (0)