This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-01-23
Channels
- # announcements (1)
- # babashka (13)
- # cherry (12)
- # cider (6)
- # clj-kondo (3)
- # cljs-dev (28)
- # clojure (77)
- # clojure-europe (25)
- # clojure-nl (1)
- # clojure-norway (35)
- # clojure-uk (5)
- # clojurescript (31)
- # conjure (7)
- # cursive (12)
- # data-science (9)
- # datalevin (5)
- # datomic (8)
- # hyperfiddle (21)
- # jobs (7)
- # kaocha (19)
- # malli (26)
- # matrix (3)
- # releases (1)
- # shadow-cljs (42)
- # squint (95)
- # testing (2)
- # vim (14)
- # wasm (1)
Hey folks. Has anyone come up with a nice way to integrate kaocha into a tools.build-based workflow?
{:paths ["src"]
:deps {org.clojure/clojure {:mvn/version "1.11.1"}}
:aliases
{:dev {:extra-paths ["dev" "test" "dev-resources"]
:extra-deps {lambdaisland/kaocha {:mvn/version "1.87.1366"}}}
:test {:exec-fn kaocha.runner/exec-fn
:exec-args {}}}}
Now you can evaluate tests in the REPL, and run clojure -Xtest
Thank you. What I really meant was a https://clojure.org/guides/tools_build integration
what would that integration look like? what are you hoping to accomplish?
I'm not entirely sure to be honest. With tools like tools.build, kaocha and babashka available, I'm trying to put together tooling around a project that makes it convenient to run and reproduce parts of a build/release pipeline both on a dev machine and in ci (gh actions/jenkins)
well, if you're merely looking to use something like clojure -T:build test
, then you could rely on kaocha.repl
and pass in any args
in my limited experience, there's not much difference between using a function in build.clj
and just another alias in deps.edn: clojure -M:test:kaocha
kaocha.repl has its drawbacks, one is that it doesn't support all plugins (cloverage for example)
At my job, we have a bin/ folder and fill it with bash scripts, so you just type bin/test or bin/build, and it calls the longer command
and now trying to figure out how to 'front-end' all the commands - should CI invoke bb commands, should it invoke tools.build multiple times, or should is start a tools.build process that itself defines the stages of a pipeline etc
I use babaska tasks to have a one true way to run all the useful commands
I think CI can just invite BB tasks, don't see a problem with that