enable multi-version testing
This commit is contained in:
parent
23ae537625
commit
6a8c40c998
1 changed files with 14 additions and 6 deletions
|
|
@ -2,14 +2,22 @@
|
|||
|
||||
(require '[babashka.process :as p])
|
||||
|
||||
(let [maria? (= "maria" (first *command-line-args*))
|
||||
(defn- run-tests [env v]
|
||||
(when v (println "\nTesting Clojure" v))
|
||||
(let [{:keys [exit]}
|
||||
(p/shell {:extra-env env} "clojure" (str "-X"
|
||||
(when v (str ":" v))
|
||||
":test"))]
|
||||
(when-not (zero? exit)
|
||||
(System/exit exit))))
|
||||
|
||||
(let [maria? (some #(= "maria" %) *command-line-args*)
|
||||
all? (some #(= "all" %) *command-line-args*)
|
||||
env
|
||||
(cond-> {"NEXT_JDBC_TEST_MSSQL" "yes"
|
||||
"NEXT_JDBC_TEST_MYSQL" "yes"
|
||||
"MSSQL_SA_PASSWORD" "Str0ngP4ssw0rd"}
|
||||
maria?
|
||||
(assoc "NEXT_JDBC_TEST_MARIA" "yes"))
|
||||
{:keys [exit]}
|
||||
(p/shell {:extra-env env} "clojure" "-X:test")]
|
||||
(when-not (zero? exit)
|
||||
(System/exit exit)))
|
||||
(assoc "NEXT_JDBC_TEST_MARIA" "yes"))]
|
||||
(doseq [v (if all? ["1.10" "1.11" "master"] [nil])]
|
||||
(run-tests env v)))
|
||||
|
|
|
|||
Loading…
Reference in a new issue