mirror of
https://gitlab.com/TECHNOFAB/nixlets.git
synced 2026-02-02 11:15:08 +01:00
feat: switch from flake-parts & devenv to rensa + add nixtest
This commit is contained in:
parent
6af83809f7
commit
012a3afb2d
18 changed files with 553 additions and 611 deletions
55
nix/repo/ci.nix
Normal file
55
nix/repo/ci.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{inputs, ...}: let
|
||||
inherit (inputs) cilib;
|
||||
in
|
||||
cilib.mkCI {
|
||||
pipelines."default" = {
|
||||
stages = ["test" "build" "deploy"];
|
||||
jobs = {
|
||||
"test" = {
|
||||
stage = "test";
|
||||
script = [
|
||||
# sh
|
||||
"nix run .#tests -- --junit=junit.xml"
|
||||
];
|
||||
allow_failure = true;
|
||||
artifacts = {
|
||||
when = "always";
|
||||
reports.junit = "junit.xml";
|
||||
};
|
||||
};
|
||||
"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";}
|
||||
];
|
||||
};
|
||||
"upload" = {
|
||||
stage = "deploy";
|
||||
rules = [
|
||||
{"if" = "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH";}
|
||||
];
|
||||
variables.AUTH_HEADER = "JOB-TOKEN: \${CI_JOB_TOKEN}";
|
||||
script = [
|
||||
# sh
|
||||
"nix run .#upload --impure"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue