Skip to content

Commit

Permalink
Add CircleCI config and use circleci.test lib for test result data.
Browse files Browse the repository at this point in the history
  • Loading branch information
technomancy committed Nov 27, 2017
1 parent a16421a commit 2549f38
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: 2.0
jobs:
build:
docker:
- image: clojure:lein-2.8.1
working_directory: ~/clojars
steps:
- checkout
- restore_cache:
keys:
- clojars-{{ checksum "project.clj" }}
- run: lein deps
- save_cache:
paths:
- $HOME/.m2
- $HOME/.lein
key: clojars-{{ checksum "project.clj" }}
- run: lein do run -m user/migrate, test, uberjar
- store_test_results:
path: target/test-results
- run: mv target/uberjar/clojars-web-*-standalone.jar clojars-uberjar.jar
- store_artifacts:
path: clojars-uberjar.jar
destination: uberjar
8 changes: 8 additions & 0 deletions dev-resources/circleci_test/config.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
(require '[circleci.test.report :refer (clojure-test-reporter)])
(require '[circleci.test.report.junit :as junit])

{:selectors {:all (constantly true)
:default (complement :disabled)}
:test-results-dir (or (System/getenv "CIRCLE_TEST_REPORTS")
"target/test-results")
:reporters [clojure-test-reporter junit/reporter]}
6 changes: 5 additions & 1 deletion project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@
["change" "version" "super.sport/bump-version"]
["vcs" "commit"]
["vcs" "push"]]
:aliases {"migrate" ["run" "-m" "clojars.tools.migrate-db"]}
:aliases {"migrate" ["run" "-m" "clojars.tools.migrate-db"]
"test" ["run" "-m" "circleci.test/dir" :project/test-paths]
"tests" ["run" "-m" "circleci.test"]
"retest" ["run" "-m" "circleci.test.retest"]}
:pedantic? :abort
:profiles
{:dev [:project/dev :profiles/dev]
Expand All @@ -82,6 +85,7 @@
:dependencies [[reloaded.repl "0.2.0"]
[org.clojure/tools.namespace "0.2.11"]
[eftest "0.1.0"]
[circleci/circleci.test "0.3.1"]
[kerodon "0.7.0"
:exclusions [org.apache.httpcomponents/httpcore
ring/ring-codec]]
Expand Down

0 comments on commit 2549f38

Please sign in to comment.