-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a9a7fb0
commit 4960b40
Showing
4 changed files
with
75 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#http://boot-clj.com | ||
#Thu Feb 15 12:38:47 EET 2018 | ||
BOOT_CLOJURE_NAME=org.clojure/clojure | ||
BOOT_CLOJURE_VERSION=1.9.0 | ||
BOOT_VERSION=2.7.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
(task-options! | ||
pom {:project 'com.grammarly/omniconf | ||
:version "0.3.0-SNAPSHOT" | ||
:description "Configuration library for Clojure that favors explicitness" | ||
:license {"Apache License, Version 2.0" | ||
"http://www.apache.org/licenses/LICENSE-2.0"} | ||
:url "https://github.com/grammarly/omniconf" | ||
:scm {:url "https://github.com/grammarly/omniconf"}}) | ||
|
||
(def clj-version (or (System/getenv "BOOT_CLOJURE_VERSION") "1.9.0")) | ||
|
||
(set-env! | ||
:dependencies `[[org.clojure/clojure ~clj-version :scope "provided"] | ||
[boot/core "2.7.2" :scope "provided"] | ||
[metosin/bat-test "0.4.0" :scope "test"]] | ||
:source-paths #{"src/"} | ||
:test-paths #{"test/"} | ||
:target-path "target/") | ||
|
||
(require 'boot.util) | ||
|
||
(ns-unmap 'boot.user 'test) | ||
(deftask test | ||
"Run unit tests." | ||
[j junit bool "Produce JUnit XML."] | ||
(set-env! :source-paths #(into % (get-env :test-paths))) | ||
(require 'metosin.bat-test) | ||
(let [reporters (if junit | ||
[:pretty {:type :junit :output-to "target/junit.xml"}] | ||
[:pretty])] | ||
((resolve 'metosin.bat-test/bat-test) :report reporters))) | ||
|
||
(deftask build | ||
"Build the JAR file." | ||
[] | ||
(set-env! :resource-paths (get-env :source-paths) | ||
;; Remove unnecessary deps | ||
:dependencies | ||
(fn [deps] | ||
(remove #(let [{:keys [project scope]} (boot.util/dep-as-map %)] | ||
(or (= project 'boot/core) | ||
(= scope "test"))) | ||
deps))) | ||
(comp (pom) (jar))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,24 @@ | ||
test: | ||
override: | ||
- lein test2junit | ||
- lein with-profile 1.7 test | ||
- lein with-profile 1.8 test | ||
- lein cloverage && cp -r target/coverage $CIRCLE_ARTIFACTS | ||
version: 2 | ||
jobs: | ||
build: | ||
working_directory: ~/project | ||
docker: | ||
- image: clojure:boot-2.7.2-alpine | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
key: project-{{ checksum "boot.properties" }}-{{ checksum "build.boot" }} | ||
- run: boot test --junit | ||
- store_test_results: | ||
path: target/ | ||
- store_artifacts: | ||
path: target/ | ||
- save_cache: | ||
paths: | ||
- ~/.m2 | ||
- ~/.boot/cache/lib | ||
- ~/.boot/cache/bin | ||
key: project-{{ checksum "boot.properties" }}-{{ checksum "build.boot" }} | ||
environment: | ||
BOOT_JVM_OPTIONS: "-Xms512m -Xmx1024m" | ||
BOOT_WATCHERS_DISABLE: "yes" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters