enable multi-version testing

This commit is contained in:
Sean Corfield 2023-12-17 11:40:26 -08:00
parent 23ae537625
commit 6a8c40c998

View file

@ -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)))