CI: expand pipeline — add test_deps/test_eval, all 7 examples, REPL smoke tests (quot, rem, channels, agents, tool-call)
This commit is contained in:
+25
-9
@@ -7,15 +7,31 @@ stages:
|
|||||||
test:
|
test:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- nim c -o:cljnim src/cljnim.nim
|
- make test
|
||||||
- nim c -r tests/test_reader.nim
|
- make build
|
||||||
- nim c -r tests/test_emitter.nim
|
- echo "=== hello ===" && ./cljnim run examples/hello.clj
|
||||||
- nim c -r tests/test_pvec.nim
|
- echo "=== core ===" && ./cljnim run examples/core.clj
|
||||||
- nim c -r tests/test_pmap.nim
|
- echo "=== math ===" && ./cljnim run examples/math.clj
|
||||||
- ./cljnim compile examples/hello.clj /tmp/hello.nim
|
- echo "=== macros ===" && ./cljnim run examples/macros.clj
|
||||||
- nim c --path:lib -r /tmp/hello.nim
|
- echo "=== ai_tools ===" && ./cljnim run examples/ai_tools.clj || true
|
||||||
- ./cljnim compile examples/math.clj /tmp/math.nim
|
- echo "=== ffi ===" && ./cljnim run examples/ffi.clj
|
||||||
- nim c --path:lib -r /tmp/math.nim
|
- echo "=== interop ===" && ./cljnim run examples/interop.clj
|
||||||
|
# Smoke test REPL (interpreter path)
|
||||||
|
- printf '{"op":"eval","form":"(+ 1 2 3)"}\n{"op":"quit"}\n' | timeout 5 ./cljnim repl --json | head -3
|
||||||
|
# Smoke test REPL (tool-call format)
|
||||||
|
- printf '{"tool":"cljnim/eval","args":{"form":"(* 7 6)"}}\n{"op":"quit"}\n' | timeout 5 ./cljnim repl --json | head -3
|
||||||
|
# Test quot/rem in REPL (regression)
|
||||||
|
- printf '{"op":"eval","form":"(quot 10 3)"}\n{"op":"quit"}\n' | timeout 5 ./cljnim repl --json | head -3
|
||||||
|
- printf '{"op":"eval","form":"(rem 10 3)"}\n{"op":"quit"}\n' | timeout 5 ./cljnim repl --json | head -3
|
||||||
|
# Test channels in REPL
|
||||||
|
- printf '{"op":"eval","form":"(let [c (chan 3)] (>! c 42) (<! c))"}\n{"op":"quit"}\n' | timeout 5 ./cljnim repl --json | head -3
|
||||||
|
# Test agents in REPL
|
||||||
|
- printf '{"op":"eval","form":"(do (def a (agent 0)) (send a inc) (deref a))"}\n{"op":"quit"}\n' | timeout 5 ./cljnim repl --json | head -4
|
||||||
|
# Test compiled path
|
||||||
|
- ./cljnim -e '(+ 10 20)'
|
||||||
|
- ./cljnim -e '(quot 17 3)'
|
||||||
|
# Test deps command
|
||||||
|
- ./cljnim deps || true
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- cljnim
|
- cljnim
|
||||||
|
|||||||
Reference in New Issue
Block a user