Skip to content

Commit

Permalink
add vm test that runs in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ibizaman committed Nov 22, 2023
1 parent 4b9e0ad commit 7eb8431
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,10 @@ jobs:
- uses: cachix/install-nix-action@v22
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
extra_nix_config: "system-features = nixos-test benchmark big-parallel kvm"
- uses: cachix/cachix-action@v12
with:
name: selfhostblocks
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix flake check
- run: nix build .#checks.x86_64-linux.vms.postgresql
4 changes: 4 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@
./test/modules/postgresql.nix
]);
};

vms = {
postgresql = pkgs.callPackage ./test/vm/postgresql.nix {};
};
};
}
);
Expand Down
14 changes: 14 additions & 0 deletions test/vm/postgresql.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{ pkgs, lib, ... }:
let

in pkgs.nixosTest {
name = "postgresql";

nodes.machine = { config, pkgs, ... }: {

};

testScript = { nodes, ... }: ''
start_all()
'';
}

0 comments on commit 7eb8431

Please sign in to comment.