From f1e45d16bbe48ce865288ac8332d8104073b937f Mon Sep 17 00:00:00 2001 From: Sean Corfield Date: Fri, 10 May 2019 13:42:58 -0700 Subject: [PATCH] First pass at CircleCI testing --- .circleci/config.yml | 23 +++++++++++++++++++++++ deps.edn | 4 ++++ 2 files changed, 27 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..6862b0b --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,23 @@ +version: 2 # use CircleCI 2.0 +jobs: # basic units of work in a run + build: # runs not using Workflows must have a `build` job as entry point + working_directory: ~/next-jdbc + docker: # run the steps with Docker + - image: circleci/clojure:openjdk-11-tools-deps-1.10.0.442 +# environment: # environment variables for primary container +# JVM_OPTS: -Xmx3200m # limit the maximum heap size to prevent out of memory errors + steps: # commands that comprise the `build` job + - checkout # check out source code to working directory + - restore_cache: # restores saved cache if checksum hasn't changed since the last run + key: next-jdbc-{{ checksum "deps.edn" }} + - run: clojure -A:test:runner-ci -Spath + - save_cache: # generate and store cache in the .m2 directory using a key template + paths: + - ~/.m2 + - ~/.gitlibs + key: next-jdbc-{{ checksum "deps.edn" }} + - run: clojure -A:test:runner +# - store_artifacts: # Upload test summary for display in Artifacts: https://circleci.com/docs/2.0/artifacts/ +# path: target/uberjar/cci-demo-clojure.jar +# destination: uberjar + # See https://circleci.com/docs/2.0/deployment-integrations/ for deploy examples diff --git a/deps.edn b/deps.edn index 12d0f3c..c2ae1a9 100644 --- a/deps.edn +++ b/deps.edn @@ -14,6 +14,10 @@ org.xerial/sqlite-jdbc {:mvn/version "3.23.1"} ;; Note: Assumes Java 8; there's a .jre7 version as well com.microsoft.sqlserver/mssql-jdbc {:mvn/version "6.2.2.jre8"}}} + :runner-ci ; to get deps cached on CircleCI + {:extra-deps {com.cognitect/test-runner + {:git/url "https://github.com/cognitect-labs/test-runner" + :sha "cb96e80f6f3d3b307c59cbeb49bb0dcb3a2a780b"}}} :runner {:extra-deps {com.cognitect/test-runner {:git/url "https://github.com/cognitect-labs/test-runner"