remove deprecated tests in ./tests/pure

This commit is contained in:
DavHau 2022-04-20 16:41:37 +02:00
parent feb7eabd0c
commit f1f1633804
5 changed files with 15 additions and 128 deletions

View File

@ -273,29 +273,23 @@
'';
});
checks =
l.recursiveUpdate
(forAllSystems (system: pkgs: (import ./tests/pure {
inherit lib pkgs;
dream2nix = dream2nixFor."${system}";
})))
(forAllSystems (system: pkgs: {
pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
treefmt = {
enable = true;
name = "treefmt";
pass_filenames = false;
entry = l.toString (pkgs.writeScript "treefmt" ''
#!${pkgs.bash}/bin/bash
export PATH="$PATH:${alejandra.defaultPackage.${system}}/bin"
${pkgs.treefmt}/bin/treefmt --clear-cache --fail-on-change
'');
};
checks = forAllSystems (system: pkgs: {
pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
treefmt = {
enable = true;
name = "treefmt";
pass_filenames = false;
entry = l.toString (pkgs.writeScript "treefmt" ''
#!${pkgs.bash}/bin/bash
export PATH="$PATH:${alejandra.defaultPackage.${system}}/bin"
${pkgs.treefmt}/bin/treefmt --clear-cache --fail-on-change
'');
};
};
}));
};
});
templates = {
simple = {

View File

@ -1,17 +0,0 @@
{
lib ? pkgs.lib,
pkgs ? import <nixpkgs> {},
dream2nix ? import ./src {inherit pkgs;},
}: let
l = pkgs.lib // builtins;
buildProjectsTests = import ./projects.nix {
inherit lib pkgs dream2nix;
};
otherTests = import ./other {
inherit lib pkgs dream2nix;
};
in
buildProjectsTests
// otherTests

View File

@ -1,18 +0,0 @@
{
lib ? pkgs.lib,
pkgs ? import <nixpkgs> {},
dream2nix ? import ./src {inherit pkgs;},
}: let
l = pkgs.lib // builtins;
fetchAggrgatedGithub =
dream2nix.utils.toDrv
(dream2nix.fetchSources {
dreamLock = ./prettier-github-aggregated.json;
})
.fetchedSources
.prettier
."2.4.1";
in {
inherit fetchAggrgatedGithub;
}

View File

@ -1,30 +0,0 @@
{
"_generic": {
"mainPackageName": "prettier",
"mainPackageVersion": "2.4.1",
"sourcesAggregatedHash": "sha256-ro6ysaTWAtUtKO0w3y7YFMq99nkOwucuwlKLBiFyuZ0=",
"subsystem": "nodejs",
"translatedBy": "nodejs.pure.yarn-lock",
"translator": "yarn-lock",
"translatorParams": ""
},
"_subsystem": {
"nodejsVersion": "14"
},
"cyclicDependencies": {},
"dependencies": {
"prettier": {
"2.4.1": []
}
},
"sources": {
"prettier": {
"2.4.1": {
"owner": "prettier",
"repo": "prettier",
"rev": "2.4.1",
"type": "github"
}
}
}
}

View File

@ -1,42 +0,0 @@
{
lib ? pkgs.lib,
pkgs ? import <nixpkgs> {},
dream2nix ? import ./src {inherit pkgs;},
}: let
lib = pkgs.lib // builtins;
makeTest = {
name,
source,
cmds,
}: let
outputs = dream2nix.makeOutputs {
inherit source;
};
commandsToRun = cmds outputs;
in
pkgs.runCommand "test-${name}" {}
(lib.concatStringsSep "\n" commandsToRun);
projects = {
prettier = {
source = lib.fetchTarball {
url = "https://github.com/prettier/prettier/tarball/2.4.1";
sha256 = "19b37qakhlsnr2n5bgv83aih5npgzbad1d2p2rs3zbq5syqbxdyi";
};
cmds = outputs: let
prettier = outputs.defaultPackage.overrideAttrs (old: {
dontBuild = true;
});
in [
"${prettier}/bin/prettier --version | grep -q 2.4.1 && mkdir $out"
];
};
};
allTests =
lib.mapAttrs
(name: args: makeTest (args // {inherit name;}))
projects;
in
allTests