-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CLI smoke tests to GitHub Workflow
- Loading branch information
1 parent
4635f0a
commit 8f142b4
Showing
3 changed files
with
49 additions
and
5 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
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
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,20 @@ | ||
(ns smoke-test | ||
(:require [babashka.process :as p] | ||
[clojure.test :refer [deftest is run-tests]])) | ||
|
||
(deftest check-lein-plugin | ||
(is (zero? (:exit (p/shell {:dir "lein-cljfmt", :continue true} | ||
"lein cljfmt check"))))) | ||
|
||
(deftest check-clj-tool | ||
(is (zero? (:exit (p/shell | ||
"clj -M -m cljfmt.main check cljfmt/src cljfmt/test"))))) | ||
|
||
(deftest check-standalone | ||
(is (zero? (:exit (p/shell | ||
"cljfmt/target/cljfmt check cljfmt/src cljfmt/test"))))) | ||
|
||
(defn -main [] | ||
(let [{:keys [fail error]} (run-tests 'smoke-test)] | ||
(when (pos? (+ fail error)) | ||
(System/exit 1)))) |