Skip to content

Commit 621c3e0

Browse files
committed
Integrate e2e tests into zig build test
1 parent 395d996 commit 621c3e0

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

build.zig

+12-3
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,17 @@ pub fn build(b: *std.Build) void {
7171
main_tests.root_module.addImport("zul", zul.module("zul"));
7272
main_tests.root_module.addImport("msgpack", msgpack.module("msgpack"));
7373

74-
const run_main_tests = b.addRunArtifact(main_tests);
74+
const run_unit_tests = b.addRunArtifact(main_tests);
75+
const run_integration_tests = b.addSystemCommand(&[_][]const u8{ "pytest", "-vv", "tests/" });
76+
run_integration_tests.step.dependOn(&main_exe.step);
7577

76-
const test_step = b.step("test", "Run unit tests");
77-
test_step.dependOn(&run_main_tests.step);
78+
var unit_tests_step = b.step("unit-tests", "Run unit tests");
79+
unit_tests_step.dependOn(&run_unit_tests.step);
80+
81+
var e2e_tests_step = b.step("e2e-tests", "Run e2e tests");
82+
e2e_tests_step.dependOn(&run_integration_tests.step);
83+
84+
const test_step = b.step("test", "Run all tests");
85+
test_step.dependOn(unit_tests_step);
86+
test_step.dependOn(e2e_tests_step);
7887
}

0 commit comments

Comments
 (0)