From 76c3e68ccd369c0a788d6a779012d75248ffe96c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 21 Mar 2021 19:18:03 +0100 Subject: [PATCH] run tests in CI --- .github/workflows/test-flakes.yml | 6 +++++- tests/assets/ci.nix | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-flakes.yml b/.github/workflows/test-flakes.yml index a241bae..b400fc0 100644 --- a/.github/workflows/test-flakes.yml +++ b/.github/workflows/test-flakes.yml @@ -26,4 +26,8 @@ jobs: - name: List flake structure run: nix flake show - name: Build - run: nix build + run: nix build --out-link result + - name: Run tests + run: | + nix develop -c install -D ./result/bin/hydra-eval-jobs ./build/src/hydra-eval-jobs + nix develop -c pytest ./tests diff --git a/tests/assets/ci.nix b/tests/assets/ci.nix index 5e80362..48bf177 100644 --- a/tests/assets/ci.nix +++ b/tests/assets/ci.nix @@ -1,4 +1,6 @@ -with import {}; +let + pkgs = import (builtins.getFlake (toString ./.)).inputs.nixpkgs {}; +in { builtJob = pkgs.writeText "job1" "job1"; substitutedJob = pkgs.hello;