Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
dermetfan committed Jan 17, 2022
1 parent 1a0cc55 commit 73e4e0f
Showing 1 changed file with 29 additions and 23 deletions.
52 changes: 29 additions & 23 deletions actions/cicero/ci.nix
Expand Up @@ -32,11 +32,6 @@ std.behavior.onInputChange "start" name args
(lib.optionalAttrs (cfg ? statuses_url)
(std.github.reportStatus cfg.statuses_url))

(std.wrapScript "bash" (next: ''
set -x
${lib.escapeShellArgs next}
''))

(std.git.clone cfg)

{
Expand All @@ -50,6 +45,7 @@ std.behavior.onInputChange "start" name args
];
}

/*
(std.wrapScript "bash" (next: ''
set -exuo pipefail
Expand All @@ -59,6 +55,12 @@ std.behavior.onInputChange "start" name args
${lib.escapeShellArgs next}
''))
*/

(std.wrapScript "bash" (next: ''
lint
${lib.escapeShellArgs next}
''))

std.nix.build
];
Expand All @@ -70,17 +72,19 @@ std.behavior.onInputChange "start" name args
sidecar = true;
};

config.packages = std.data-merge.append [
"github:input-output-hk/cicero/${cfg.sha}#cicero"
];
config = {
packages = std.data-merge.append [
"github:input-output-hk/cicero/${cfg.sha}#cicero"
];
command = [ "/bin/cicero" "start" ];
};
}

std.nix.install

(std.script "bash" ''
set -ex
exec cicero start
'')
# (std.script "bash" ''
# exec cicero start
# '')
];

dev = {
Expand All @@ -96,11 +100,6 @@ std.behavior.onInputChange "start" name args
(lib.optionalAttrs (cfg ? statuses_url)
(std.github.reportStatus cfg.statuses_url))

(std.wrapScript "bash" (next: ''
set -ex
exec ${lib.escapeShellArgs next}
''))

(std.git.clone cfg)

{
Expand All @@ -109,14 +108,21 @@ std.behavior.onInputChange "start" name args
cpu = 16000;
};

config.packages = std.data-merge.append [
"github:input-output-hk/cicero/${cfg.sha}#devShell.x86_64-linux"
];
config = {
packages = std.data-merge.append [
"github:input-output-hk/cicero/${cfg.sha}#devShell.x86_64-linux"
];
config = [
"/bin/schemathesis" "run"
"http://127.0.0.1:\${NOMAD_PORT_http}/documentation/cicero.yaml"
"--validate-schema=false"
];
};
}

(std.script "bash" ''
exec schemathesis run http://127.0.0.1:$NOMAD_PORT_http/documentation/cicero.yaml --validate-schema=false
'')
# (std.script "bash" ''
# exec schemathesis run http://127.0.0.1:$NOMAD_PORT_http/documentation/cicero.yaml --validate-schema=false
# '')
];
};
};
Expand Down

0 comments on commit 73e4e0f

Please sign in to comment.