1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-25 07:58:31 +02:00

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.
This commit is contained in:
Robert Helgesson 2020-11-15 09:14:01 +01:00
parent b9b8a42fda
commit 9fe15dc83b
No known key found for this signature in database
GPG Key ID: 36BDAA14C2797E89
4 changed files with 1 additions and 29 deletions

View File

@ -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

View File

@ -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

View File

@ -1 +0,0 @@
{ meta-formatting = ./formatting.nix; }

View File

@ -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
'';
};
}