diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 22476b7..c75f0ca 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -6,7 +6,5 @@ jobs: with: nix_conf: | allow-import-from-derivation = true - filter_builds: | - '.top_attr == "checks" and .system == "x86_64-linux"' secrets: nixbuild_token: ${{ secrets.nixbuild_token }} diff --git a/flake.nix b/flake.nix index 4a83e42..b447e76 100644 --- a/flake.nix +++ b/flake.nix @@ -78,12 +78,14 @@ checks = let + inherit (pkgs.lib) foldl foldlAttrs mergeAttrs optionalAttrs; + importFiles = files: map (m: pkgs.callPackage m {}) files; - mergeTests = pkgs.lib.lists.foldl pkgs.lib.trivial.mergeAttrs {}; + mergeTests = foldl mergeAttrs {}; - flattenAttrs = root: attrset: pkgs.lib.attrsets.foldlAttrs (acc: name: value: acc // { + flattenAttrs = root: attrset: foldlAttrs (acc: name: value: acc // { "${root}_${name}" = value; }) {} attrset; @@ -95,7 +97,7 @@ ); shblib = pkgs.callPackage ./lib {}; - in (rec { + in (optionalAttrs (system == "x86_64-linux") ({ modules = shblib.check { inherit pkgs; tests = @@ -132,7 +134,7 @@ // (vm_test "postgresql" ./test/blocks/postgresql.nix) // (vm_test "restic" ./test/blocks/restic.nix) // (vm_test "ssl" ./test/blocks/ssl.nix) - ); + )); } ) // { herculesCI.ciSystems = [ "x86_64-linux" ];