mirror of
https://gitlab.com/TECHNOFAB/nix-gitlab-ci.git
synced 2025-12-12 02:00:13 +01:00
test: add basic test for flakeModule functionality
This commit is contained in:
parent
0952ab4145
commit
e074d716c4
7 changed files with 73 additions and 6 deletions
41
tests/fixtures/flake_parts/flake.nix
vendored
Normal file
41
tests/fixtures/flake_parts/flake.nix
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
outputs = {
|
||||
flake-parts,
|
||||
systems,
|
||||
...
|
||||
} @ inputs:
|
||||
flake-parts.lib.mkFlake {inherit inputs;} {
|
||||
imports = [
|
||||
"@repo_path@/lib/flakeModule.nix"
|
||||
];
|
||||
systems = import systems;
|
||||
flake = {};
|
||||
perSystem = _: {
|
||||
ci = {
|
||||
config = {
|
||||
# true is already default, just for testing
|
||||
nixJobsByDefault = true;
|
||||
};
|
||||
pipelines = {
|
||||
"default" = {
|
||||
stages = ["example"];
|
||||
jobs."example" = {
|
||||
stage = "example";
|
||||
script = ["echo hello world"];
|
||||
};
|
||||
};
|
||||
"test".jobs."example" = {
|
||||
stage = ".pre";
|
||||
script = ["echo hello world"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
systems.url = "github:nix-systems/default-linux";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue