File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 3232 - name : Check format
3333 continue-on-error : true
3434 run : zig fmt --check .
35- - name : Build
36- run : zig build
35+ - name : Build and run tests
36+ run : zig build test
Original file line number Diff line number Diff line change @@ -11,6 +11,20 @@ pub fn build(b: *std.Build) void {
1111 .root_source_file = b .path ("src/zopengl.zig" ),
1212 });
1313
14+ {
15+ const test_step = b .step ("test" , "Run zopengl tests" );
16+
17+ const tests = b .addTest (.{
18+ .name = "zopengl-tests" ,
19+ .root_source_file = b .path ("src/zopengl.zig" ),
20+ .target = target ,
21+ .optimize = optimize ,
22+ });
23+ b .installArtifact (tests );
24+
25+ test_step .dependOn (& b .addRunArtifact (tests ).step );
26+ }
27+
1428 const lib = b .addStaticLibrary (.{
1529 .name = "zopengl" ,
1630 .root_source_file = b .path ("src/zopengl.zig" ),
You can’t perform that action at this time.
0 commit comments