Add cljs tests to travis
* Add lein-doo plugin to run cljs tests. This is the new recommended approach. * Update project.clj to add cljsbuild config * Update .travis.yml file to run cljs tests as well. * Also to speed up travis builds add ~/.m2 dir in cache To run do: $ lein do javac, doo phantom test-build once Note that you'll need phantomjs installed for above to work.
This commit is contained in:
parent
6b080a2575
commit
4695c96998
3 changed files with 16 additions and 5 deletions
|
|
@ -1,3 +1,8 @@
|
|||
language: clojure
|
||||
lein: 2.7.1
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.m2
|
||||
script:
|
||||
- lein test
|
||||
- lein doo phantom test-build once
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@
|
|||
:test-paths ["test", "target/test-classes"]
|
||||
:auto-clean false
|
||||
:dependencies [[riddley "0.1.12"]]
|
||||
:plugins [[lein-codox "0.9.5"]]
|
||||
:plugins [[lein-codox "0.9.5"]
|
||||
[lein-doo "0.1.7"]]
|
||||
:codox {:source-paths ["target/classes" "src/clj"]
|
||||
:namespaces [com.rpl.specter
|
||||
com.rpl.specter.zipper
|
||||
|
|
@ -20,6 +21,12 @@
|
|||
#".*" "https://github.com/nathanmarz/specter/tree/{version}/src/clj/{classpath}#L{line}"}}
|
||||
|
||||
|
||||
:cljsbuild {:builds [{:id "test-build"
|
||||
:source-paths ["src/clj" "target/classes" "test"]
|
||||
:compiler {:output-to "out/testable.js"
|
||||
:main 'com.rpl.specter.cljs-test-runner
|
||||
:optimizations :simple}}]}
|
||||
|
||||
:profiles {:dev {:dependencies
|
||||
[[org.clojure/test.check "0.9.0"]
|
||||
[org.clojure/clojure "1.8.0"]
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
(ns com.rpl.specter.cljs-test-runner
|
||||
(:require [cljs.test :as test :refer-macros [run-tests]]
|
||||
(:require [doo.runner :refer-macros [doo-tests]]
|
||||
[com.rpl.specter.core-test]
|
||||
[com.rpl.specter.zipper-test]))
|
||||
|
||||
|
||||
(run-tests 'com.rpl.specter.core-test)
|
||||
(run-tests 'com.rpl.specter.zipper-test)
|
||||
(doo-tests 'com.rpl.specter.core-test
|
||||
'com.rpl.specter.zipper-test)
|
||||
|
|
|
|||
Loading…
Reference in a new issue