File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -72,12 +72,22 @@ pub fn build(b: *std.Build) !void {
7272 .target = target ,
7373 .optimize = optimize ,
7474 });
75- // tests.emit_docs = .emit;
7675 const run_tests = try install (tests , .{});
7776
7877 const test_step = b .step ("test" , "Run unit tests and also generate the documentation" );
7978 test_step .dependOn (run_tests );
8079
80+ const docs = b .addTest (.{
81+ .root_source_file = FileSource .relative ("src/main.zig" ),
82+ .target = target ,
83+ .optimize = optimize ,
84+ });
85+ b .installDirectory (.{ .source_dir = docs .getEmittedDocs (), .install_dir = .{ .custom = "docs/" }, .install_subdir = "" });
86+ const run_docs = try install (docs , .{});
87+
88+ const docs_step = b .step ("docs" , "Generate documentation and run unit tests" );
89+ docs_step .dependOn (run_docs );
90+
8191 const coverage_tests = b .addTest (.{
8292 .root_source_file = FileSource .relative ("src/main.zig" ),
8393 .target = target ,
You can’t perform that action at this time.
0 commit comments