File tree 2 files changed +16
-2
lines changed
2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 32
32
- name : Check format
33
33
continue-on-error : true
34
34
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 {
11
11
.root_source_file = b .path ("src/zopengl.zig" ),
12
12
});
13
13
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
+
14
28
const lib = b .addStaticLibrary (.{
15
29
.name = "zopengl" ,
16
30
.root_source_file = b .path ("src/zopengl.zig" ),
You can’t perform that action at this time.
0 commit comments