mirror of
https://gitlab.com/TECHNOFAB/nix-gitlab-ci.git
synced 2025-12-12 02:00:13 +01:00
chore: split everything up into their own files & add a bunch of tests
This commit is contained in:
parent
b309fb59db
commit
2f197d2c50
20 changed files with 704 additions and 310 deletions
23
flake.nix
23
flake.nix
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue