Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for the library #45

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add tests for the library
pnmadelaine committed Feb 28, 2024
commit ab5cd4f6b2d69987cd94fcd082e9d9c302b7fcbb
1 change: 1 addition & 0 deletions nix/checks/default.nix
Original file line number Diff line number Diff line change
@@ -4,4 +4,5 @@
}: {
formatted = import ./formatted.nix {inherit inputs system;};
nixos = import ./nixos.nix {inherit inputs system;};
lib = import ./lib.nix {inherit inputs system;};
}
57 changes: 57 additions & 0 deletions nix/checks/lib.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
inputs ? import ../inputs.nix,
system ? builtins.currentSystem or "unknown-system",
lib ? import ../lib {inherit inputs;},
pkgs ? import ../nixpkgs.nix {inherit inputs system;},
utils ? import ../utils.nix {inherit inputs;},
}: let
owner = "typhon";
repo = "typhon-ci";
typhonUrl = "https://etna.typhon-ci.org/";
secrets = pkgs.writeText "secrets" "";
all = {
github =
(
lib.github.mkProject {
inherit owner repo typhonUrl secrets;
deploy = [
{
name = "push to cachix";
value = lib.cachix.mkPush {
name = "typhon";
};
}
{
name = "github pages";
value = lib.github.mkPages {
inherit owner repo;
job = "main";
customDomain = "typhon-ci.org";
};
}
];
}
)
.actions;
gitea =
(lib.gitea.mkProject {
inherit owner repo typhonUrl secrets;
instance = "codeberg.org";
})
.actions;
dummy =
(lib.dummy.mkProject {
url = "github:typhon-ci/typhon";
})
.actions;
git = lib.git.mkJobsets {
url = "https://github.com/typhon-ci/typhon";
};
};
in
pkgs.stdenv.mkDerivation {
name = "check-typhon-lib";
buildInputs = utils.lib.mapAttrsToList (_: x: x.${system}) all;
phases = ["installPhase"];
installPhase = "touch $out";
}
1 change: 1 addition & 0 deletions nix/jobs.nix
Original file line number Diff line number Diff line change
@@ -6,5 +6,6 @@ in {
doc = import ./packages/doc.nix {inherit inputs system;};
formatted = import ./checks/formatted.nix {inherit inputs system;};
nixos = import ./checks/nixos.nix {inherit inputs system;};
lib = import ./checks/lib.nix {inherit inputs system;};
};
}