Skip to content

Instantly share code, notes, and snippets.

@samedhi
Created November 14, 2016 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samedhi/04eabca50bd021270c9094b9d54e1ec2 to your computer and use it in GitHub Desktop.
Save samedhi/04eabca50bd021270c9094b9d54e1ec2 to your computer and use it in GitHub Desktop.
Example of short circuiting on test failures.
(deftask build
"Builds cljs and code for production"
[]
(comp
(cljs :optimizations :advanced)
(target)))
(deftask testing []
(merge-env! :source-paths #{"test"})
identity)
(deftask test-fast
"Runs all clojure test"
[]
(comp
(testing)
(boot-test/test)))
(deftask test-medium
"Runs all clojurescript test"
[]
(comp
(testing)
(test-cljs)))
(deftask test-slow
"Runs the headless selenium integration test"
[]
(comp
(testing)
(build)
;; TEST WITH SELENIUM
))
(deftask test
"Runs all test"
[]
(comp
(test-fast) ;; This will short circuit `test-medium and `test-slow if it fails
(test-medium) ;; I would like this one to short circuit as well
(test-slow)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment