Skip to content

Commit

Permalink
ci: add cargo doc tests and audit to flake check
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Kosiewski <[email protected]>
  • Loading branch information
ThomasK33 committed Mar 1, 2025
1 parent d14bcac commit 611deb7
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: Cargo checks
name: Nix flake check

on:
push:
pull_request:

jobs:
clippy_check:
nix_flake_check:
name: Nix flake check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
17 changes: 17 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
flake-utils.url = "github:numtide/flake-utils";
crane.url = "github:ipetkov/crane";
advisory-db = {
url = "github:rustsec/advisory-db";
flake = false;
};
};

outputs =
Expand All @@ -13,6 +17,7 @@
nixpkgs,
flake-utils,
crane,
advisory-db,
}:
flake-utils.lib.eachDefaultSystem (
system:
Expand Down Expand Up @@ -58,6 +63,18 @@
inherit cargoArtifacts;
}
);
# Doc tests
cargo-doc = craneLib.cargoDoc (
commonArgs
// {
inherit cargoArtifacts;
}
);
# Audit dependencies
cargo-audit = craneLib.cargoAudit {
inherit advisory-db;
inherit (commonArgs) src;
};
};

devShells = {
Expand Down

0 comments on commit 611deb7

Please sign in to comment.