From cfd663f1f61b059f3ca8865797773a8253b51c01 Mon Sep 17 00:00:00 2001 From: Dan Peddle Date: Sun, 26 Jan 2020 22:07:38 +0100 Subject: [PATCH] add kaocha --- .circleci/config.yml | 29 ++++++++++++----------------- bin/kaocha | 3 +++ deps.edn | 16 +++++++++------- tests.edn | 5 +++++ 4 files changed, 29 insertions(+), 24 deletions(-) create mode 100755 bin/kaocha create mode 100644 tests.edn diff --git a/.circleci/config.yml b/.circleci/config.yml index 6abd295..3ebe4c5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,27 +2,22 @@ version: 2 jobs: build: docker: - - image: circleci/clojure:tools-deps - - working_directory: ~/repo - - environment: - LEIN_ROOT: "true" - JVM_OPTS: -Xmx3200m - + - image: circleci/clojure:tools-deps-1.10.0.442-node steps: - checkout - - # Download and cache dependencies - restore_cache: keys: - - v1-dependencies-{{ checksum "deps.edn" }} - - - run: clojure -R:test -e "" - + - 'clj-v1-{{ checksum "deps.edn" }}' # -{{ checksum "package-lock.json" }}' + - 'clj-v1' + # - run: npm install + - run: mkdir -p test-results + - run: bin/kaocha --plugin kaocha.plugin/junit-xml --junit-xml-file test-results/kaocha/results.xml + - store_test_results: + path: test-results - save_cache: + key: 'clj-v1-{{checksum "deps.edn"}}' #-{{ checksum "package-lock.json" }}' paths: - ~/.m2 - key: v1-dependencies-{{ checksum "deps.edn" }} - - - run: clojure -A:test \ No newline at end of file + - ~/.cljs/.aot_cache + - ~/node_modules + - ~/.gitlibs \ No newline at end of file diff --git a/bin/kaocha b/bin/kaocha new file mode 100755 index 0000000..924d1e1 --- /dev/null +++ b/bin/kaocha @@ -0,0 +1,3 @@ + +#!/usr/bin/env bash +clojure -A:test -m kaocha.runner "$@" diff --git a/deps.edn b/deps.edn index ff8d9ea..8713647 100644 --- a/deps.edn +++ b/deps.edn @@ -1,13 +1,15 @@ {:paths ["src"] - :deps {edn-query-language/eql {:mvn/version "0.0.9"} - aysylu/loom {:mvn/version "1.0.2"}} + :deps {edn-query-language/eql {:mvn/version "0.0.9"} + aysylu/loom {:mvn/version "1.0.2"}} :aliases {:provided {:extra-deps {org.clojure/clojure {:mvn/version "1.10.1"} org.clojure/clojurescript {:mvn/version "1.10.597"}}} :test {:extra-paths ["test" "dev"] - :extra-deps {com.datomic/datomic-free {:mvn/version "0.9.5697" - :exclusions [joda-time - commons-codec]} - com.cognitect/test-runner {:git/url "https://github.com/cognitect-labs/test-runner.git" - :sha "f7ef16dc3b8332b0d77bc0274578ad5270fbfedd"}} + :extra-deps {lambdaisland/kaocha {:mvn/version "0.0-565"} + lambdaisland/kaocha-cljs {:mvn/version "0.0-59"} + lambdaisland/kaocha-junit-xml {:mvn/version "0.0-70"} + com.datomic/datomic-free {:mvn/version "0.9.5697" + :exclusions [joda-time commons-codec]} + com.cognitect/test-runner {:git/url "https://github.com/cognitect-labs/test-runner.git" + :sha "f7ef16dc3b8332b0d77bc0274578ad5270fbfedd"}} :main-opts ["-m" "cognitect.test-runner"]}}} diff --git a/tests.edn b/tests.edn new file mode 100644 index 0000000..692202a --- /dev/null +++ b/tests.edn @@ -0,0 +1,5 @@ +#kaocha/v1 +{:tests [{:id :unit + :type :kaocha.type/clojure.test} + {:id :unit-cljs + :type :kaocha.type/cljs}]} \ No newline at end of file