From 73e4e0fbcd3ee639757969fbff1b91a8d3928f45 Mon Sep 17 00:00:00 2001 From: Robin Stumm Date: Mon, 17 Jan 2022 15:12:33 +0100 Subject: [PATCH] WIP --- actions/cicero/ci.nix | 52 ++++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/actions/cicero/ci.nix b/actions/cicero/ci.nix index 731c12a6..d8719803 100644 --- a/actions/cicero/ci.nix +++ b/actions/cicero/ci.nix @@ -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) { @@ -50,6 +45,7 @@ std.behavior.onInputChange "start" name args ]; } + /* (std.wrapScript "bash" (next: '' set -exuo pipefail @@ -59,6 +55,12 @@ std.behavior.onInputChange "start" name args ${lib.escapeShellArgs next} '')) + */ + + (std.wrapScript "bash" (next: '' + lint + ${lib.escapeShellArgs next} + '')) std.nix.build ]; @@ -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 = { @@ -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) { @@ -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 + # '') ]; }; };