28 lines
1.9 KiB
Clojure
28 lines
1.9 KiB
Clojure
{:paths ["integration-tests" "scripts"]
|
|
:override-builtin true
|
|
:tasks
|
|
{:requires ([integration-tasks :as it])
|
|
unit-test {:doc "Run the Clojure unit tests (test/ directory)."
|
|
:task (shell "clojure" "-M:test")}
|
|
test {:doc "Run the unit tests, then the integration tests (stops at the first failure)."
|
|
:task (do (run 'unit-test)
|
|
(run 'integration-test))}
|
|
repl {:doc "Start an nREPL server with dev dependencies"
|
|
:task (shell "clojure" "-A:dev" "-M" "-m" "nrepl.cmdline"
|
|
"--middleware" "[cider.nrepl/cider-middleware]"
|
|
"--port" (try (slurp ".nrepl-port") (catch Exception _ "3000")))}
|
|
integration-test {:doc "Run the dockerized integration tests in isolation (builds the app image, starts it on a random port, runs the test suite against it, then tears everything down)."
|
|
:task (it/run-integration {})}
|
|
unit-coverage {:doc "Run the unit tests under Cloverage; reports go to target/coverage/unit."
|
|
:task (shell "clojure" "-M:cov" "-m" "cloverage.coverage"
|
|
"--src-ns-path" "src" "--test-ns-path" "test"
|
|
"--lcov" "--html" "--output" "target/coverage/unit")}
|
|
integration-coverage {:doc "Run the dockerized integration tests against a Cloverage-instrumented app; reports go to target/coverage/integration."
|
|
:task (it/run-integration {:coverage? true})}
|
|
coverage-report {:doc "Merge the unit and integration line-coverage results into target/coverage/merged and print a summary."
|
|
:task (shell "bb" "scripts/coverage_report.clj")}
|
|
coverage {:doc "Run the full suite (unit + integration) with line coverage and write the joint report to target/coverage/merged."
|
|
:task (do (run 'unit-coverage)
|
|
(run 'integration-coverage)
|
|
(run 'coverage-report))}}}
|