Compare commits
5 commits
64bdf1c48a
...
10f3f33048
Author | SHA1 | Date | |
---|---|---|---|
10f3f33048 | |||
6900c77a32 | |||
469df7bfcd | |||
cac2b014c5 | |||
7e6110fbfe |
4 changed files with 21 additions and 6 deletions
|
@ -6,9 +6,22 @@ clone:
|
||||||
lfs: false
|
lfs: false
|
||||||
|
|
||||||
pipeline:
|
pipeline:
|
||||||
|
zig-compiler:
|
||||||
|
image: alpine
|
||||||
|
- echo "Downloading dependencies..."
|
||||||
|
- apk add curl xz
|
||||||
|
- echo "Downloading zig binary..."
|
||||||
|
- curl https://ziglang.org/download/0.10.0/zig-linux-x86_64-0.10.0.tar.xz | xz -d | tar -x
|
||||||
|
|
||||||
|
format:
|
||||||
|
image: alpine
|
||||||
|
- echo "Checking formatting..."
|
||||||
|
- ./zig-linux-x86_64-0.10.0/zig fmt --check src/ tests/ build.zig
|
||||||
|
|
||||||
unit-tests:
|
unit-tests:
|
||||||
image: alpine
|
image: alpine
|
||||||
commands:
|
commands:
|
||||||
- apk add sqlite sqlite-dev libpq libpq-dev curl xz
|
- echo "Downloading dependencies..."
|
||||||
- curl https://ziglang.org/download/0.10.0/zig-linux-x86_64-0.10.0.tar.xz | xz -d | tar -x
|
- apk add sqlite sqlite-dev libpq libpq-dev
|
||||||
- ./zig-linux-x86_64-0.10.0/zig build unit:template
|
- echo "Running unit tests..."
|
||||||
|
- ./zig-linux-x86_64-0.10.0/zig build unit
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
# Untitled Social Network server
|
# fediglam
|
||||||
|
[![status-badge](https://ci.heartles.xyz/api/badges/heartles/fediglam/status.svg)](https://ci.heartles.xyz/heartles/fediglam)
|
||||||
|
A (soon to be federated) social networking server
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
### Requirements
|
### Requirements
|
||||||
|
|
|
@ -1349,7 +1349,7 @@ test "template" {
|
||||||
|
|
||||||
try testCase("", .{}, "");
|
try testCase("", .{}, "");
|
||||||
try testCase("abcd", .{}, "abcd");
|
try testCase("abcd", .{}, "abcd");
|
||||||
try testCase("{.v}", .{ .v = @as(usize, 3) }, "4");
|
try testCase("{.val}", .{ .val = 3 }, "3");
|
||||||
try testCase("{#if .val}1{/if}", .{ .val = true }, "1");
|
try testCase("{#if .val}1{/if}", .{ .val = true }, "1");
|
||||||
try testCase("{#for .vals |$v|=} {$v} {=/for}", .{ .vals = [_]u8{ 1, 2, 3 } }, "123");
|
try testCase("{#for .vals |$v|=} {$v} {=/for}", .{ .vals = [_]u8{ 1, 2, 3 } }, "123");
|
||||||
try testCase("{#for .vals |$val|}{$val}{/for}", .{ .vals = [_]u8{ 1, 2, 3 } }, "123");
|
try testCase("{#for .vals |$val|}{$val}{/for}", .{ .vals = [_]u8{ 1, 2, 3 } }, "123");
|
||||||
|
|
Loading…
Reference in a new issue