Skip to content

Commit

Permalink
fix(ctl-full): tests not running in checks
Browse files Browse the repository at this point in the history
  • Loading branch information
klarkc committed Feb 20, 2023
1 parent 7b89330 commit 3d8865d
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions ctl-full/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -133,27 +133,29 @@
"npx http-server ./generated-docs/html -o"
'';
};
testInputs = with pkgs; [
plutip-server
postgresql
ogmios
kupo
ogmios-datum-cache
];
# FIXME ctl-full tests not working
# FIXME ctl-full purs-nix tests not working
# related to LovelaceAcademy/ctl-nix#29
# so we're using tests derivation for while
tests = pkgs.writeShellApplication {
# TODO we should move tests derivation to ctl-nix
name = "tests";
runtimeInputs = testInputs ++ [ purs-watch ];
text = ''purs-watch test "$@"'';
runtimeInputs = with pkgs; [
plutip-server
postgresql
ogmios
kupo
ogmios-datum-cache
];
text = ps.test.run { };
};
in
{
packages.default = ps.output { };

checks.default = (ps.test.check { }).overrideAttrs ({ buildInputs ? [ ], ... }: {
buildInputs = buildInputs ++ testInputs;
});
checks.default = pkgs.runCommand
"check"
{ }
''${tests}/bin/tests; touch $out'';

devShells.default =
pkgs.mkShell
Expand Down

0 comments on commit 3d8865d

Please sign in to comment.