build non-critical infrastructure in CI
Jörg Thalheim committed
Aug 18, 2024 at 12:58 UTC
64621f8d8cfed82a660b8ab4d5fc2340485f7248
3 files changed
+22
-2
.github/workflows/ci.yml
+4
-2
@@ -11,9 +11,11 @@ permissions:
11
contents: read
12
13
jobs:
14
- nix-fmt:
14
+ # We probably should replace with a different faster CI soon,
15
+ # but atleast this gives us confidence for now
16
+ nix-build:
17
runs-on: ubuntu-latest
18
steps:
19
- uses: actions/checkout@v4
20
- uses: cachix/install-nix-action@v27
19
- - run: nix fmt -- --fail-on-change
21
+ - run: nix run github:Mic92/nix-fast-build -- --no-nom
checks/flake-module.nix
new
+17
@@ -0,0 +1,17 @@
1
+{ ... }:
2
+{
3
+ perSystem =
4
+ { self', lib, ... }:
5
+ {
6
+ checks =
7
+ let
8
+ nixosMachines = lib.mapAttrs' (
9
+ name: config: lib.nameValuePair "nixos-${name}" config.config.system.build.toplevel
10
+ ) ((lib.filterAttrs (_: config: config.pkgs.system == system)) self.nixosConfigurations);
11
+
12
+ packages = lib.mapAttrs' (n: lib.nameValuePair "package-${n}") self'.packages;
13
+ devShells = lib.mapAttrs' (n: lib.nameValuePair "devShell-${n}") self'.devShells;
14
+ in
15
+ nixosMachines // packages // devShells;
16
+ };
17
+}
flake.nix
+1
@@ -51,6 +51,7 @@
51
];
52
imports = [
53
./formatter/flake-module.nix
54
+ ./checks/flake-module.nix
55
./terraform/flake-module.nix
56
./non-critical-infra/flake-module.nix
57
];