mirror of
https://github.com/zigzap/zap.git
synced 2025-10-20 07:04:08 +00:00
fix tests on gh
This commit is contained in:
parent
ecb03cb90e
commit
729a614c30
3 changed files with 10 additions and 10 deletions
9
.github/workflows/build-current-zig.yml
vendored
9
.github/workflows/build-current-zig.yml
vendored
|
@ -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"
|
||||
|
|
5
.github/workflows/mastercheck.yml
vendored
5
.github/workflows/mastercheck.yml
vendored
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue