summaryrefslogtreecommitdiff
path: root/checks.nix
diff options
context:
space:
mode:
Diffstat (limited to 'checks.nix')
-rw-r--r--checks.nix51
1 files changed, 35 insertions, 16 deletions
diff --git a/checks.nix b/checks.nix
index b813d83..56c5038 100644
--- a/checks.nix
+++ b/checks.nix
@@ -1,23 +1,42 @@
-{ inputs, ... }:
{
perSystem =
- { lib, pkgs, ... }:
+ { pkgs, ... }:
{
checks = {
- inherit
- (inputs.flake-checks.lib.mkChecks {
- inherit pkgs;
- root = lib.fileset.toSource {
- root = ./.;
- fileset = lib.fileset.gitTracked ./.;
- };
- })
- actionlint
- alejandra
- deadnix
- editorconfig
- statix
- ;
+ check-formatting =
+ pkgs.runCommand "check-formatting" { nativeBuildInputs = [ pkgs.nixfmt-rfc-style ]; }
+ ''
+ cd ${./.}
+
+ echo "running nixfmt..."
+ nixfmt --check .
+
+ touch $out
+ '';
+
+ check-lint =
+ pkgs.runCommand "check-lint"
+ {
+ nativeBuildInputs = [
+ pkgs.actionlint
+ pkgs.deadnix
+ pkgs.statix
+ ];
+ }
+ ''
+ cd ${./.}
+
+ echo "running actionlint..."
+ actionlint ./.github/workflows/*
+
+ echo "running deadnix..."
+ deadnix --fail
+
+ echo "running statix..."
+ statix check .
+
+ touch $out
+ '';
};
};
}