From 95d02f7c8f02c4443a1f9478139dfb19fcb2cc50 Mon Sep 17 00:00:00 2001 From: Sven Rademakers Date: Thu, 12 Oct 2023 10:45:06 +0100 Subject: [PATCH] Add cargo verification pipeline This CI pipeline runs some trivial jobs on every commit to check: * unit-tests are passing * linter did not find any improvements * "default" cargo-deny pass on licenses, source code --- .github/workflows/cargo_ci.yml | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/cargo_ci.yml diff --git a/.github/workflows/cargo_ci.yml b/.github/workflows/cargo_ci.yml new file mode 100644 index 0000000..7fb7d7f --- /dev/null +++ b/.github/workflows/cargo_ci.yml @@ -0,0 +1,35 @@ +name: 'Cargo CI' +on: push + +jobs: + cargo-clippy: + runs-on: ubuntu-latest + steps: + - run: | + sudo apt-get update &&\ + sudo apt-get install libusb-1.0-0-dev -y + - uses: actions/checkout@v3 + - run: rustup component add clippy + - uses: actions-rs/clippy-check@v1 + with: + token: '${{ secrets.GITHUB_TOKEN }}' + args: '--all-features -- -D warnings' + cargo-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + default: true + profile: minimal + - uses: actions-rs/cargo@v1 + with: + command: test + cargo-deny: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: EmbarkStudios/cargo-deny-action@v1 + with: + command: check bans licenses sources