| author | |
| committer | |
| log | e0e65698ff6c9f75c9944c38f75ce66811300af1 |
| tree | ba2cc9a9168eebd970de0aa771d444e98420eea7 |
| parent | 0658fc7228151e5c08e8a0260d0b98f711757499 |
3 files changed, 22 insertions(+), 3 deletions(-)
build.zig+11-2| ... | ... | @@ -23,6 +23,15 @@ pub fn build(b: *std.Build) void { |
| 23 | 23 | const run_step = b.step("run", "Run the app"); |
| 24 | 24 | run_step.dependOn(&run_cmd.step); |
| 25 | 25 | |
| 26 | const test_step = b.step("test", "dummy test step to pass CI checks"); | |
| 27 | _ = test_step; | |
| 26 | const tests = b.addTest(.{ | |
| 27 | .root_source_file = b.path("test.zig"), | |
| 28 | .target = target, | |
| 29 | .optimize = mode, | |
| 30 | }); | |
| 31 | deps.addAllTo(tests); | |
| 32 | ||
| 33 | const test_step = b.step("test", "Run all library tests"); | |
| 34 | const tests_run = b.addRunArtifact(tests); | |
| 35 | tests_run.has_side_effects = true; | |
| 36 | test_step.dependOn(&tests_run.step); | |
| 28 | 37 | } |
test.zig created+7| ... | ... | @@ -0,0 +1,7 @@ |
| 1 | const std = @import("std"); | |
| 2 | const zorm = @import("zorm"); | |
| 3 | ||
| 4 | // TODO: add more behavior tests that create+update+delete dbs | |
| 5 | test { | |
| 6 | std.testing.refAllDeclsRecursive(zorm.engine(.sqlite3)); | |
| 7 | } |
zig.mod+4-1| ... | ... | @@ -4,5 +4,8 @@ main: src/lib.zig |
| 4 | 4 | license: AGPL-3.0 |
| 5 | 5 | description: The ORM library for Zig. |
| 6 | 6 | dependencies: |
| 7 | - src: git https://github.com/vrischmann/zig-sqlite | |
| 7 | - src: git https://github.com/vrischmann/zig-sqlite commit-91e5fedd15c5ea3cb42ccceefb3d0f4bb9bad68f | |
| 8 | c_source_files: | |
| 9 | - c/sqlite3.c | |
| 10 | - c/workaround.c | |
| 8 | 11 | - src: git https://github.com/nektro/zig-tracer |