Skip to content

Commit

Permalink
Add tulia task that run system tests. Make it bors mandatory.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbgi committed Feb 28, 2023
1 parent ec57638 commit a7237b9
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 16 deletions.
1 change: 1 addition & 0 deletions bors.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
status = [
"check-cabal-files",
"ci/pr/required",
"ci/pr/system-tests",
]
timeout_sec = 7200
required_approvals = 1
Expand Down
17 changes: 17 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,23 @@
}).workbench-profile-run { };

inherit (pkgs) all-profiles-json;

system-tests = pkgs.writeShellApplication {
name = "system-tests";
runtimeInputs = with pkgs; [ git gnused ];
text = ''
NODE_REV="${self.rev or (throw "Sorry, need clean/pushed git revision to run system tests")}"
MAKE_TARGET=testpr
mkdir -p tmp && cd tmp
rm -rf cardano-node-tests
git clone https://github.com/input-output-hk/cardano-node-tests.git
cd cardano-node-tests
sed -i '1 s/^.*$/#! \/usr\/bin\/env bash/' ./.github/regression.sh
export NODE_REV
export MAKE_TARGET
nix develop --accept-flake-config .#base -c ./.github/regression.sh 2>&1
'';
};
}
# Add checks to be able to build them individually
// (prefixNamesWith "checks/" checks);
Expand Down
48 changes: 32 additions & 16 deletions nix/tullia.nix
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,19 @@ rec {

"ci/pr" = { lib, ... } @ args: {
imports = [ common ];
after = [ "ci/pr/required" "ci/pr/nonrequired" "ci/cardano-deployment" ];
after = [ "ci/pr/required" "ci/pr/nonrequired" "ci/cardano-deployment" "ci/pr/system-tests" ];
};

"ci/pr/system-tests" = {lib, ...} @ args: {
imports = [common];
after = [];

command.text = ''
nix run -L .#system-tests
'';

memory = 1024 * 64;
nomad.resources.cpu = 40000;
};
};

Expand All @@ -100,6 +112,20 @@ rec {
#input: "${ciInputName}"
#repo: "${repository}"
'';
prAndBorsIo = ''
let github = {
#input: "${ciInputName}"
#repo: "${repository}"
}
let borsBranches = {
#branch: "staging|trying"
}
#lib.merge
#ios: [
#lib.io.github_pr & github,
#lib.io.github_push & borsBranches & github,
]
'';
pushIo = ''
#lib.io.github_push
#input: "${ciInputName}"
Expand All @@ -108,7 +134,6 @@ rec {
'';
in
{

"cardano-node/ci/push/required" = {
task = "ci/push/required";
io = pushIo;
Expand All @@ -120,20 +145,7 @@ rec {
# This one is used for both PR status and bors:
"cardano-node/ci/pr/required" = {
task = "ci/pr/required";
io = ''
let github = {
#input: "${ciInputName}"
#repo: "${repository}"
}
let borsBranches = {
#branch: "staging|trying"
}
#lib.merge
#ios: [
#lib.io.github_pr & github,
#lib.io.github_push & borsBranches & github,
]
'';
io = prAndBorsIo;
};
"cardano-node/ci/pr/nonrequired" = {
task = "ci/pr/nonrequired";
Expand All @@ -143,5 +155,9 @@ rec {
task = "ci/cardano-deployment";
io = prIo;
};
"cardano-node/ci/pr/system-tests" = {
task = "ci/pr/system-tests";
io = prAndBorsIo;
};
};
}

0 comments on commit a7237b9

Please sign in to comment.