From 729a614c303a7d1e9c87ea3b7d10a1932919d428 Mon Sep 17 00:00:00 2001 From: renerocksai Date: Thu, 28 Aug 2025 22:56:37 +0200 Subject: [PATCH] fix tests on gh --- .github/workflows/build-current-zig.yml | 9 +++++---- .github/workflows/mastercheck.yml | 5 ++--- build.zig | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-current-zig.yml b/.github/workflows/build-current-zig.yml index 0c9684c..bf70e3b 100644 --- a/.github/workflows/build-current-zig.yml +++ b/.github/workflows/build-current-zig.yml @@ -18,21 +18,22 @@ jobs: - uses: actions/checkout@v3 - uses: goto-bus-stop/setup-zig@v2 with: - version: 0.14.0 + version: 0.15.1 - name: Check zig version run: zig version - name: Build all examples run: zig build all # Run tests separately so we can see more clearly which one fails # Also, the test runner tries to run tests concurrently, which causes - # conflicts when port numbers are re-used in the tests + # conflicts when port numbers are re-used in the tests (which they aren't + # anymore) - name: Run mustache tests run: zig build test-mustache - name: Run httpparams tests - run: zig build test-httpparams + run: zig build test-http_params - name: Run sendfile tests run: zig build test-sendfile - name: Run authentication tests - run: zig build test-authentication + run: zig build test-auth - name: Report end of tests run: echo "tests finished" diff --git a/.github/workflows/mastercheck.yml b/.github/workflows/mastercheck.yml index aa36178..97cef70 100644 --- a/.github/workflows/mastercheck.yml +++ b/.github/workflows/mastercheck.yml @@ -31,11 +31,10 @@ jobs: - name: Run mustache tests run: zig build test-mustache - name: Run httpparams tests - run: zig build test-httpparams + run: zig build test-http_params - name: Run sendfile tests run: zig build test-sendfile - name: Run authentication tests - run: zig build test-authentication + run: zig build test-auth - name: Report end of tests run: echo "tests finished" - diff --git a/build.zig b/build.zig index 33ea909..d3e0049 100644 --- a/build.zig +++ b/build.zig @@ -22,7 +22,7 @@ const TestSystem = struct { }); tests.root_module.addImport("zap", self.zap_module); - const step = self.b.step(self.b.fmt("test{s}", .{test_name}), self.b.fmt("Run {s} unit tests [REMOVE zig-cache!]", .{test_name})); + const step = self.b.step(self.b.fmt("test-{s}", .{test_name}), self.b.fmt("Run {s} unit tests [REMOVE zig-cache!]", .{test_name})); self.addRunInstallToStep(tests, step); } @@ -170,7 +170,7 @@ pub fn build(b: *std.Build) !void { // we can call it again when needed. const test_step = b.step("test", "Run unit tests"); - const test_system = TestSystem {.b = b, .zap_module = zap_module, .target = target, .optimize = optimize, .combine_test_step = test_step}; + const test_system = TestSystem{ .b = b, .zap_module = zap_module, .target = target, .optimize = optimize, .combine_test_step = test_step }; // authentication tests test_system.addTest("src/tests/test_auth.zig", "auth"); // mustache tests @@ -185,7 +185,7 @@ pub fn build(b: *std.Build) !void { // dependencies have changed. // So, for now, we just force the exe to be built, so in order that // we can call it again when needed. - + // // docserver const docserver_mod = b.addModule("docserver", .{