mirror of
https://gitlab.com/rensa-nix/devshell.git
synced 2025-12-12 06:10:07 +01:00
52 lines
1.1 KiB
Nix
52 lines
1.1 KiB
Nix
|
|
{inputs, ...}: let
|
||
|
|
inherit (inputs) cilib;
|
||
|
|
in
|
||
|
|
cilib.mkCI {
|
||
|
|
pipelines."default" = {
|
||
|
|
stages = ["test" "build" "deploy"];
|
||
|
|
jobs = {
|
||
|
|
"test" = {
|
||
|
|
stage = "test";
|
||
|
|
script = [
|
||
|
|
"nix run .#tests -- --junit=junit.xml"
|
||
|
|
];
|
||
|
|
allow_failure = true;
|
||
|
|
artifacts = {
|
||
|
|
when = "always";
|
||
|
|
reports.junit = "junit.xml";
|
||
|
|
};
|
||
|
|
};
|
||
|
|
"benchmark" = {
|
||
|
|
stage = "test";
|
||
|
|
script = [
|
||
|
|
"nix run .#bench"
|
||
|
|
];
|
||
|
|
};
|
||
|
|
"docs" = {
|
||
|
|
stage = "build";
|
||
|
|
script = [
|
||
|
|
# sh
|
||
|
|
''
|
||
|
|
nix build .#docs:default
|
||
|
|
mkdir -p public
|
||
|
|
cp -r result/. public/
|
||
|
|
''
|
||
|
|
];
|
||
|
|
artifacts.paths = ["public"];
|
||
|
|
};
|
||
|
|
"pages" = {
|
||
|
|
nix.enable = false;
|
||
|
|
image = "alpine:latest";
|
||
|
|
stage = "deploy";
|
||
|
|
script = ["true"];
|
||
|
|
artifacts.paths = ["public"];
|
||
|
|
rules = [
|
||
|
|
{
|
||
|
|
"if" = "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH";
|
||
|
|
}
|
||
|
|
];
|
||
|
|
};
|
||
|
|
};
|
||
|
|
};
|
||
|
|
}
|