Skip to content

Commit 64621f8

Browse files
committed
build non-critical infrastructure in CI
1 parent da17de1 commit 64621f8

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

.github/workflows/ci.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ permissions:
1111
contents: read
1212

1313
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:
1517
runs-on: ubuntu-latest
1618
steps:
1719
- uses: actions/checkout@v4
1820
- 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

+17
Original file line numberDiff line numberDiff line change
@@ -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
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
];
5252
imports = [
5353
./formatter/flake-module.nix
54+
./checks/flake-module.nix
5455
./terraform/flake-module.nix
5556
./non-critical-infra/flake-module.nix
5657
];

0 commit comments

Comments
 (0)