Add example of running tests from build.clj

This commit is contained in:
Sean Corfield 2021-08-01 16:21:31 -07:00
parent e738120014
commit d3df912aae
2 changed files with 13 additions and 1 deletions

10
build.clj Normal file
View file

@ -0,0 +1,10 @@
(ns build
(:require [clojure.tools.build.api :as b]))
(defn run-tests
[_]
(let [basis (b/create-basis {:aliases [:test]})
cmds (b/java-command {:basis basis
:main 'clojure.main
:main-args ["-m" "cognitect.test-runner"]})]
(b/process cmds)))

View file

@ -4,7 +4,9 @@
camel-snake-kebab/camel-snake-kebab {:mvn/version "0.4.2"}}
:aliases
{:test {:extra-paths ["test"]
{:build {:deps {io.github.clojure/tools.build {:git/tag "v0.1.7" :git/sha "8a3abc2"}}
:ns-default build}
:test {:extra-paths ["test"]
:extra-deps {org.clojure/test.check {:mvn/version "1.1.0"}
io.github.cognitect-labs/test-runner
{:git/tag "v0.4.0" :git/sha "334f2e2"}