Skip to content

Commit 90ca776

Browse files
committed
checks/iperf: write output to $GITHUB_STEP_SUMMARY
1 parent 9bbc169 commit 90ca776

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,6 @@ jobs:
4646
-vL \
4747
--accept-flake-config \
4848
".#$NIX_ATTR"
49+
if [ -e result/summary.md ]; then
50+
cat result/summary.md >> $GITHUB_STEP_SUMMARY
51+
fi

checks/iperf.nix

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,19 @@ nixpkgs.lib.optionalAttrs (builtins.elem hypervisor self.lib.hypervisorsWithNetw
5959
};
6060
};
6161
testScript = ''
62+
import os
63+
6264
vm.wait_for_unit("microvm@${hypervisor}-iperf-server.service", timeout = 900)
6365
vm.succeed("ip addr add 10.0.0.2/24 dev microvm")
66+
6467
result = vm.wait_until_succeeds("iperf -c 10.0.0.1", timeout = 180)
6568
print(result)
69+
70+
path = "{}/summary.md".format(os.environ.get("out"))
71+
with open(path, 'w') as file:
72+
file.write("```\n")
73+
file.write(result)
74+
file.write("```\n")
6675
'';
6776
meta.timeout = 1800;
6877
}) { inherit system; pkgs = nixpkgs.legacyPackages.${system}; };

0 commit comments

Comments
 (0)