From 9fe15dc83b058d3d0eeaff8ddee434c092c09ae1 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sun, 15 Nov 2020 09:14:01 +0100 Subject: [PATCH] tests: remove format meta test This test requires copying the Home Manager checkout to the Nix store, which seems to require too much memory for the CI jobs. Instead simply run the format script directly. --- .github/workflows/test.yml | 1 + tests/default.nix | 1 - tests/meta/default.nix | 1 - tests/meta/formatting.nix | 27 --------------------------- 4 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 tests/meta/default.nix delete mode 100644 tests/meta/formatting.nix diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 13967daf8..7572016cb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,5 +18,6 @@ jobs: with: name: nix-community signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' + - run: ./format -c - run: nix-shell . -A install - run: nix-shell --pure tests -A run.all diff --git a/tests/default.nix b/tests/default.nix index 3bbe8820b..f749c2f3a 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -76,7 +76,6 @@ import nmt { ] ++ lib.optionals pkgs.stdenv.hostPlatform.isDarwin [ ./modules/targets-darwin ] ++ lib.optionals pkgs.stdenv.hostPlatform.isLinux [ - ./meta # Suffices to run on one platform. ./modules/misc/debug ./modules/misc/numlock ./modules/misc/pam diff --git a/tests/meta/default.nix b/tests/meta/default.nix deleted file mode 100644 index 0f02fcfb4..000000000 --- a/tests/meta/default.nix +++ /dev/null @@ -1 +0,0 @@ -{ meta-formatting = ./formatting.nix; } diff --git a/tests/meta/formatting.nix b/tests/meta/formatting.nix deleted file mode 100644 index 2d5800c53..000000000 --- a/tests/meta/formatting.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; - -let - - pinnedNixpkgs = builtins.fetchTarball { - url = - "https://github.com/NixOS/nixpkgs/archive/05f0934825c2a0750d4888c4735f9420c906b388.tar.gz"; - sha256 = "1g8c2w0661qn89ajp44znmwfmghbbiygvdzq0rzlvlpdiz28v6gy"; - }; - - pinnedPkgs = import pinnedNixpkgs { }; - -in { - config = { - nmt.script = '' - PATH="${with pinnedPkgs; lib.makeBinPath [ findutils nixfmt ]}:$PATH" - cd ${../..} - if ! ${pkgs.runtimeShell} format -c; then - fail "${'' - Expected source code to be formatted with nixfmt but it was not. - This error can be resolved by running the './format' in the project root directory.''}" - fi - ''; - }; -}