From 96743539a7237be7b544f76ef1d3516563ca8f3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sosth=C3=A8ne=20Gu=C3=A9don?= Date: Tue, 4 Mar 2025 10:55:59 +0100 Subject: [PATCH] Add CI workflows --- .github/workflows/ci.yml | 26 ++++++++++++++++++++++++++ src/command/writer.rs | 1 - 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8ee69a3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,26 @@ +# Copyright (C) Nitrokey GmbH +# SPDX-License-Identifier: CC0-1.0 + +name: CI + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + - name: Install rust + run: | + rustup show + - name: Check formatting + run: cargo fmt --check + - name: Run tests + run: cargo t --all-features + - name: Check clippy warnings + run: cargo clippy -- -Dwarnings + - name: Check clippy warnings + run: cargo clippy --all-features -- -Dwarnings + - name: Check doc warnings + run: RUSTDOCFLAGS=-Dwarnings cargo doc --all-features diff --git a/src/command/writer.rs b/src/command/writer.rs index f1ff616..5090c32 100644 --- a/src/command/writer.rs +++ b/src/command/writer.rs @@ -30,7 +30,6 @@ pub trait Writer { type Error: Error; fn write(&mut self, data: &[u8]) -> Result; - /// data must be smaller than [`remaining_len`](Writer::remaining_len) fn write_all(&mut self, data: &[u8]) -> Result<(), Self::Error> { let mut offset = 0; while offset < data.len() {