chore: split everything up into their own files & add a bunch of tests

This commit is contained in:
technofab 2025-05-31 21:29:54 +02:00
parent b309fb59db
commit 2f197d2c50
20 changed files with 704 additions and 310 deletions

View file

@ -15,12 +15,16 @@
systems = import systems;
flake = {};
perSystem = {
lib,
pkgs,
config,
self',
system,
...
}: rec {
imports = [
./tests
];
treefmt = {
projectRootFile = "flake.nix";
programs = {
@ -201,7 +205,7 @@
stage = "nixtest";
script = [
# sh
"nix run .#nixtests:run -- --junit=junit.xml"
"nix run .#nixtests:run -- --junit=junit.xml --pure"
];
allow_failure = true;
artifacts = {
@ -223,23 +227,6 @@
};
};
nixtest.suites = let
jsonFile = file: builtins.fromJSON (builtins.readFile file);
in {
"Pipeline YAMLs" = [
{
name = "default";
type = "snapshot";
actual = jsonFile self'.legacyPackages."gitlab-ci:pipeline:default";
}
{
name = "non-default";
type = "snapshot";
actual = jsonFile self'.legacyPackages."gitlab-ci:pipeline:non-default";
}
];
};
packages = let
setupScript = pkgs.writeShellScriptBin "setup_nix_ci" (builtins.readFile ./scripts/setup_nix_ci.sh);
finalizeScript = pkgs.writeShellScriptBin "finalize_nix_ci" (builtins.readFile ./scripts/finalize_nix_ci.sh);