From 990d464eae882e137d55f0ee4f3965ffda401f8e Mon Sep 17 00:00:00 2001 From: "edward.gokmen" Date: Thu, 8 Feb 2024 13:21:37 +0000 Subject: [PATCH] flake check passes locally --- .github/workflows/ci.yml | 21 +++++++++++++++++++-- .nix/buffrs.nix | 18 ------------------ 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a687b71b..45a33bb9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,16 @@ jobs: - run: rustup update && rustup component add rustfmt - run: cargo fmt --check --all - # TODO: get registry nixified so we set up an equivalent task in `Nix Buffrs CI` + clippy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: rustup update && rustup component add clippy + - name: Install Protoc + uses: arduino/setup-protoc@v2 + - uses: Swatinem/rust-cache@v2 + - run: cargo clippy --all-targets --workspace -- -D warnings -D clippy::all + test: runs-on: ubuntu-latest steps: @@ -37,7 +46,15 @@ jobs: env: RUST_BACKTRACE: 1 - # TODO: get registry nixified so we set up an equivalent task in `Nix Buffrs CI` + deny: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: rustup update + - uses: Swatinem/rust-cache@v2 + - run: cargo install cargo-deny || true + - run: cargo deny --workspace check + coverage: runs-on: ubuntu-latest steps: diff --git a/.nix/buffrs.nix b/.nix/buffrs.nix index 95b61283..faecffd8 100644 --- a/.nix/buffrs.nix +++ b/.nix/buffrs.nix @@ -28,24 +28,6 @@ in { # Build the crate as part of `nix flake check` for convenience buffrs = buffrs; - # Run clippy (and deny all warnings) on the crate source, - # again, resuing the dependency artifacts from above. - # - # Note that this is done as a separate derivation so that - # we can block the CI if there are issues here, but not - # prevent downstream consumers from building our crate by itself. - buffrs-clippy = craneLib.cargoClippy (commonArgs // { - inherit cargoArtifacts; - cargoClippyExtraArgs = - "--all-targets --workspace -- -D warnings -D clippy::all"; - }); - - # Check formatting - buffrs-fmt = craneLib.cargoFmt { - inherit src; - cargoDenyExtraArgs = "--workspace check"; - }; - # Audit dependencies buffrs-audit = craneLib.cargoAudit { inherit src advisory-db;