diff --git a/examples/mattermost-webapp/flake.nix b/examples/mattermost-webapp/flake.nix index 1f49918a..cc53ac63 100644 --- a/examples/mattermost-webapp/flake.nix +++ b/examples/mattermost-webapp/flake.nix @@ -19,6 +19,7 @@ source = src; }) // { - checks = self.packages; + # checks are too expensive + # checks = self.packages; }; } diff --git a/examples/ripgrep/flake.nix b/examples/ripgrep/flake.nix index da858fe8..0514d3d3 100644 --- a/examples/ripgrep/flake.nix +++ b/examples/ripgrep/flake.nix @@ -25,6 +25,6 @@ ]; }) // { - checks = self.packages; + checks.x86_64-linux.ripgrep = self.packages.x86_64-linux.ripgrep; }; } diff --git a/tests/examples/default.nix b/tests/examples/default.nix index f7ef4b3c..529d88a6 100644 --- a/tests/examples/default.nix +++ b/tests/examples/default.nix @@ -1,6 +1,8 @@ { self, lib, + async, + bash, coreutils, git, nix, @@ -13,6 +15,8 @@ in utils.writePureShellScript [ + async + bash coreutils git nix @@ -24,16 +28,27 @@ in examples=$1 fi + S=$(mktemp) + async -s=$S server --start -j$(nproc) + sleep 1 + for dir in $examples; do - echo -e "\ntesting example for $dir" - mkdir tmp - cp ${examples}/$dir/* ./tmp/ - chmod -R +w ./tmp - cd ./tmp - nix flake lock --override-input dream2nix ${../../.} - nix run .#resolveImpure - nix flake check - cd - - rm -r tmp + async -s=$S cmd -- bash -c " + echo -e \"\ntesting example for $dir\" + tmp=\$(mktemp -d) + echo \"tempdir: \$tmp\" + mkdir \$tmp + cp ${examples}/$dir/* \$tmp/ + chmod -R +w \$tmp + cd \$tmp + nix flake lock --override-input dream2nix ${../../.} + nix run .#resolveImpure + nix flake check + cd - + rm -r \$tmp + " done + + async -s=$S wait + rm $S ''