Skip to content

Commit

Permalink
Extend CI checks
Browse files Browse the repository at this point in the history
This patch adds clippy and rustfmt to the CI and fails the workflow if
cargo doc shows a warning.
  • Loading branch information
robin-nitrokey committed Aug 8, 2024
1 parent e6435d2 commit 3d24d0e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,19 @@ jobs:
- name: Build
run: cargo build --release --verbose

- name: Run clippy
if: matrix.target == 'x86_64-unknown-linux-gnu'
run: cargo clippy --all-features --all-targets -- --deny warnings

- name: Check code format
if: matrix.target == 'x86_64-unknown-linux-gnu'
run: cargo fmt -- --check

- name: Run tests
if: matrix.target == 'x86_64-unknown-linux-gnu'
run: >
cargo test &&
cargo test --release
- name: Build Documentation
run: cargo doc --no-deps
- name: Check documentation
run: RUSTDOCFLAGS="-D warnings" cargo doc --no-deps
2 changes: 1 addition & 1 deletion src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ fn test_iter_dirs() {
let mut storage = RamStorage::new(&mut backend);
Filesystem::format(&mut storage).unwrap();
Filesystem::mount_and_then(&mut storage, |fs| {
fs.create_dir(path!("/tmp").into())?;
fs.create_dir(path!("/tmp"))?;

// TODO: we might want "multi-open"
fs.create_file_and_then(path!("/tmp/file.a"), |file| {
Expand Down

0 comments on commit 3d24d0e

Please sign in to comment.