only run xtdb tests on jdk21+
Signed-off-by: Sean Corfield <sean@corfield.org>
This commit is contained in:
parent
2a30c5cffd
commit
150a4aa605
6 changed files with 15 additions and 7 deletions
2
.github/workflows/test-and-release.yml
vendored
2
.github/workflows/test-and-release.yml
vendored
|
|
@ -15,7 +15,7 @@ jobs:
|
||||||
- uses: actions/setup-java@v4
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: '11'
|
java-version: '21'
|
||||||
- name: Setup Clojure
|
- name: Setup Clojure
|
||||||
uses: DeLaGuardo/setup-clojure@master
|
uses: DeLaGuardo/setup-clojure@master
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
4
.github/workflows/test-and-snapshot.yml
vendored
4
.github/workflows/test-and-snapshot.yml
vendored
|
|
@ -13,7 +13,7 @@ jobs:
|
||||||
- uses: actions/setup-java@v4
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: '11'
|
java-version: '21'
|
||||||
- name: Setup Clojure
|
- name: Setup Clojure
|
||||||
uses: DeLaGuardo/setup-clojure@master
|
uses: DeLaGuardo/setup-clojure@master
|
||||||
with:
|
with:
|
||||||
|
|
@ -75,4 +75,4 @@ jobs:
|
||||||
~/.cpcache
|
~/.cpcache
|
||||||
key: ${{ runner.os }}-${{ hashFiles('**/deps.edn') }}
|
key: ${{ runner.os }}-${{ hashFiles('**/deps.edn') }}
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: clojure -T:build test
|
run: clojure -T:build:jdk${{ matrix.java }} test
|
||||||
|
|
|
||||||
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
|
|
@ -38,7 +38,7 @@ jobs:
|
||||||
NEXT_JDBC_TEST_MYSQL: yes
|
NEXT_JDBC_TEST_MYSQL: yes
|
||||||
NEXT_JDBC_TEST_MARIADB: yes
|
NEXT_JDBC_TEST_MARIADB: yes
|
||||||
- name: Run All Tests
|
- name: Run All Tests
|
||||||
run: clojure -M:test:runner
|
run: clojure -M:test:runner:jdk${{ matrix.java }}
|
||||||
env:
|
env:
|
||||||
MYSQL_ROOT_PASSWORD: testing
|
MYSQL_ROOT_PASSWORD: testing
|
||||||
NEXT_JDBC_TEST_MYSQL: yes
|
NEXT_JDBC_TEST_MYSQL: yes
|
||||||
|
|
|
||||||
6
deps.edn
6
deps.edn
|
|
@ -40,8 +40,6 @@
|
||||||
io.zonky.test.postgres/embedded-postgres-binaries-windows-amd64 {:mvn/version "17.4.0"}
|
io.zonky.test.postgres/embedded-postgres-binaries-windows-amd64 {:mvn/version "17.4.0"}
|
||||||
org.xerial/sqlite-jdbc {:mvn/version "3.49.1.0"}
|
org.xerial/sqlite-jdbc {:mvn/version "3.49.1.0"}
|
||||||
com.microsoft.sqlserver/mssql-jdbc {:mvn/version "12.10.0.jre11"}
|
com.microsoft.sqlserver/mssql-jdbc {:mvn/version "12.10.0.jre11"}
|
||||||
;; only need the XTDB JDBC module:
|
|
||||||
com.xtdb/xtdb-jdbc {:mvn/version "2.0.0-beta7"}
|
|
||||||
;; use log4j2 to reduce log noise during testing:
|
;; use log4j2 to reduce log noise during testing:
|
||||||
org.apache.logging.log4j/log4j-api {:mvn/version "2.24.3"}
|
org.apache.logging.log4j/log4j-api {:mvn/version "2.24.3"}
|
||||||
;; bridge everything into log4j:
|
;; bridge everything into log4j:
|
||||||
|
|
@ -52,5 +50,9 @@
|
||||||
org.apache.logging.log4j/log4j-slf4j2-impl {:mvn/version "2.24.3"}}
|
org.apache.logging.log4j/log4j-slf4j2-impl {:mvn/version "2.24.3"}}
|
||||||
:jvm-opts ["-Dlog4j2.configurationFile=log4j2-info.properties"]}
|
:jvm-opts ["-Dlog4j2.configurationFile=log4j2-info.properties"]}
|
||||||
:runner {:main-opts ["-m" "lazytest.main"]}
|
:runner {:main-opts ["-m" "lazytest.main"]}
|
||||||
|
:jdk11 {}
|
||||||
|
:jdk17 {}
|
||||||
|
:jdk21 {:extra-deps {;; only need the XTDB JDBC module:
|
||||||
|
com.xtdb/xtdb-jdbc {:mvn/version "2.0.0-beta7"}}}
|
||||||
:jdk24 {:jvm-opts [;; for SQLite on JDK 24 locally
|
:jdk24 {:jvm-opts [;; for SQLite on JDK 24 locally
|
||||||
"--enable-native-access=ALL-UNNAMED"]}}}
|
"--enable-native-access=ALL-UNNAMED"]}}}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,9 @@
|
||||||
(str "-M"
|
(str "-M"
|
||||||
(when v (str ":" v))
|
(when v (str ":" v))
|
||||||
":test:runner"
|
":test:runner"
|
||||||
|
;; jdk21+ adds xtdb:
|
||||||
|
(when (System/getenv "NEXT_JDBC_TEST_XTDB")
|
||||||
|
":jdk21")
|
||||||
;; to suppress native access warnings on JDK24:
|
;; to suppress native access warnings on JDK24:
|
||||||
":jdk24")
|
":jdk24")
|
||||||
"--output" "dots")]
|
"--output" "dots")]
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,10 @@
|
||||||
(def ^:private test-xtdb-map {:dbtype "xtdb" :dbname "xtdb"})
|
(def ^:private test-xtdb-map {:dbtype "xtdb" :dbname "xtdb"})
|
||||||
|
|
||||||
(def ^:private test-xtdb
|
(def ^:private test-xtdb
|
||||||
(when (System/getenv "NEXT_JDBC_TEST_XTDB") test-xtdb-map))
|
(when (and (System/getenv "NEXT_JDBC_TEST_XTDB")
|
||||||
|
;; only if we're on jdk21+
|
||||||
|
(str/starts-with? (System/getProperty "java.version") "2"))
|
||||||
|
test-xtdb-map))
|
||||||
|
|
||||||
(def ^:private test-db-specs
|
(def ^:private test-db-specs
|
||||||
(cond-> [test-derby test-h2-mem test-h2 test-hsql test-sqlite]
|
(cond-> [test-derby test-h2-mem test-h2 test-hsql test-sqlite]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue