test it
This commit is contained in:
parent
9c9bb8d697
commit
f1d92abfe0
10
.github/workflows/ci.yml
vendored
Normal file
10
.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
name: CI
|
||||||
|
jobs:
|
||||||
|
smoke-test:
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: .
|
||||||
|
inputs:
|
||||||
|
version: 0.5.0
|
||||||
|
- run: zig run src/main.zig
|
||||||
|
working-directory: test
|
14
test/build.zig
Normal file
14
test/build.zig
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
const Builder = @import("std").build.Builder;
|
||||||
|
|
||||||
|
pub fn build(b: *Builder) void {
|
||||||
|
const mode = b.standardReleaseOptions();
|
||||||
|
const exe = b.addExecutable("test", "src/main.zig");
|
||||||
|
exe.setBuildMode(mode);
|
||||||
|
exe.install();
|
||||||
|
|
||||||
|
const run_cmd = exe.run();
|
||||||
|
run_cmd.step.dependOn(b.getInstallStep());
|
||||||
|
|
||||||
|
const run_step = b.step("run", "Run the app");
|
||||||
|
run_step.dependOn(&run_cmd.step);
|
||||||
|
}
|
6
test/src/main.zig
Normal file
6
test/src/main.zig
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
const io = @import("std").io;
|
||||||
|
|
||||||
|
pub fn main() anyerror!void {
|
||||||
|
const stdout = try io.getStdOut();
|
||||||
|
try stdout.write("it works!\n");
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user