switch run tests to bb
This commit is contained in:
parent
18b09c0bd7
commit
334d295cc9
2 changed files with 14 additions and 22 deletions
14
run-tests.clj
Executable file
14
run-tests.clj
Executable file
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/usr/bin/env bb
|
||||||
|
|
||||||
|
(require '[babashka.process :as p])
|
||||||
|
|
||||||
|
(let [maria? (= "maria" (first *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"))]
|
||||||
|
(-> (p/shell {:extra-env env} "clojure" "-X:test")
|
||||||
|
:exit
|
||||||
|
(System/exit)))
|
||||||
22
run-tests.sh
22
run-tests.sh
|
|
@ -1,22 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# start databases with: docker-compose up
|
|
||||||
# then:
|
|
||||||
#
|
|
||||||
# test against "all" databases with MySQL JDBC driver:
|
|
||||||
# ./run-tests.sh
|
|
||||||
#
|
|
||||||
# test against "all" databases with MariaDB JDBC driver:
|
|
||||||
# ./run-tests.sh maria
|
|
||||||
|
|
||||||
if test "$1" = "maria"
|
|
||||||
then
|
|
||||||
NEXT_JDBC_TEST_MSSQL=yes MSSQL_SA_PASSWORD=Str0ngP4ssw0rd \
|
|
||||||
NEXT_JDBC_TEST_MYSQL=yes NEXT_JDBC_TEST_MARIADB=yes clojure -X:test
|
|
||||||
fi
|
|
||||||
if test "$1" = ""
|
|
||||||
then
|
|
||||||
NEXT_JDBC_TEST_MSSQL=yes MSSQL_SA_PASSWORD=Str0ngP4ssw0rd \
|
|
||||||
NEXT_JDBC_TEST_MYSQL=yes clojure -X:test
|
|
||||||
fi
|
|
||||||
exit $?
|
|
||||||
Loading…
Reference in a new issue