Skip to content

Commit 1ad4cc9

Browse files
committed
Add tulia task that run system tests. Make it bors mandatory.
1 parent ec57638 commit 1ad4cc9

File tree

3 files changed

+50
-15
lines changed

3 files changed

+50
-15
lines changed

bors.toml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
status = [
22
"check-cabal-files",
33
"ci/pr/required",
4+
"ci/pr/system-tests",
45
]
56
timeout_sec = 7200
67
required_approvals = 1

flake.nix

+17
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,23 @@
257257
}).workbench-profile-run { };
258258

259259
inherit (pkgs) all-profiles-json;
260+
261+
system-tests = pkgs.writeShellApplication {
262+
name = "system-tests";
263+
runtimeInputs = with pkgs; [ git gnused ];
264+
text = ''
265+
NODE_REV="${self.rev or "$(git rev-parse --abbrev-ref HEAD)"}"
266+
MAKE_TARGET=testpr
267+
mkdir -p tmp && cd tmp
268+
rm -rf cardano-node-tests
269+
git clone https://github.com/input-output-hk/cardano-node-tests.git
270+
cd cardano-node-tests
271+
sed -i '1 s/^.*$/#! \/usr\/bin\/env bash/' ./.github/regression.sh
272+
export NODE_REV
273+
export MAKE_TARGET
274+
nix develop --accept-flake-config .#base -c ./.github/regression.sh 2>&1
275+
'';
276+
};
260277
}
261278
# Add checks to be able to build them individually
262279
// (prefixNamesWith "checks/" checks);

nix/tullia.nix

+32-15
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,19 @@ rec {
8989

9090
"ci/pr" = { lib, ... } @ args: {
9191
imports = [ common ];
92-
after = [ "ci/pr/required" "ci/pr/nonrequired" "ci/cardano-deployment" ];
92+
after = [ "ci/pr/required" "ci/pr/nonrequired" "ci/cardano-deployment" "ci/pr/system-tests" ];
93+
};
94+
95+
"ci/pr/system-tests" = {lib, ...} @ args: {
96+
imports = [common];
97+
after = [];
98+
99+
command.text = ''
100+
nix run -L .#system-tests
101+
'';
102+
103+
memory = 1024 * 64;
104+
nomad.resources.cpu = 40000;
93105
};
94106
};
95107

@@ -100,6 +112,20 @@ rec {
100112
#input: "${ciInputName}"
101113
#repo: "${repository}"
102114
'';
115+
prAndBorsIo = ''
116+
let github = {
117+
#input: "${ciInputName}"
118+
#repo: "${repository}"
119+
}
120+
let borsBranches = {
121+
#branch: "staging|trying"
122+
}
123+
#lib.merge
124+
#ios: [
125+
#lib.io.github_pr & github,
126+
#lib.io.github_push & borsBranches & github,
127+
]
128+
'';
103129
pushIo = ''
104130
#lib.io.github_push
105131
#input: "${ciInputName}"
@@ -120,20 +146,7 @@ rec {
120146
# This one is used for both PR status and bors:
121147
"cardano-node/ci/pr/required" = {
122148
task = "ci/pr/required";
123-
io = ''
124-
let github = {
125-
#input: "${ciInputName}"
126-
#repo: "${repository}"
127-
}
128-
let borsBranches = {
129-
#branch: "staging|trying"
130-
}
131-
#lib.merge
132-
#ios: [
133-
#lib.io.github_pr & github,
134-
#lib.io.github_push & borsBranches & github,
135-
]
136-
'';
149+
io = prAndBorsIo;
137150
};
138151
"cardano-node/ci/pr/nonrequired" = {
139152
task = "ci/pr/nonrequired";
@@ -143,5 +156,9 @@ rec {
143156
task = "ci/cardano-deployment";
144157
io = prIo;
145158
};
159+
"cardano-node/ci/pr/system-tests" = {
160+
task = "ci/pr/system-tests";
161+
io = prAndBorsIo;
162+
};
146163
};
147164
}

0 commit comments

Comments
 (0)