Skip to content

Commit 121e639

Browse files
authored
tests & ci: Add Clojure 1.12 alpha (#250)
* tests & ci: Add Clojure 1.12 alpha Clojure 1.12 alpha is mature enough to test against it. No changes to tests, will handle new meta syntax separately. * maint: ci: bump github actions versions * test libs: bump refactor-nrepl * ci: bump setup-clojure action * canary tests: downgrade lein version Current lein latest is causing refactor-nrepl canary test to fail.
1 parent c47485b commit 121e639

File tree

10 files changed

+25
-14
lines changed

10 files changed

+25
-14
lines changed

.github/workflows/libs-test.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ jobs:
5151
clj-cache-prefix: clj-libs-deps-${{ matrix.lib-name }}
5252
clj-cache-hash-files: "'script/test_libs.clj','deps.edn','bb.edn'"
5353

54+
## Lein version > 2.10.0 is causing refactor-nrepl to fail, so explicitly install a version that works
55+
## instead of using lein bundled with github actions image.
56+
## Upcoming 2.11.2 might fix, can optionally revisit in the future.
57+
- name: Install Lein
58+
uses: DeLaGuardo/[email protected]
59+
with:
60+
lein: 2.10.0
61+
5462
- name: Install Planck
5563
uses: ./.github/workflows/setup-planck
5664
if: contains( matrix.requires, 'planck' )

.github/workflows/native-image-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
os: [ windows, ubuntu, macos ]
2020
java-version: [ '21.0.1' ]
2121
test: [ native, native-sci ]
22-
clojure-version: [ '1.11' ]
22+
clojure-version: [ '1.11', '1.12' ]
2323

2424
name: ${{ matrix.os }},jdk${{ matrix.java-version }},${{ matrix.test }},clj${{ matrix.clojure-version }}
2525

.github/workflows/shared-setup/action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ runs:
2323

2424
steps:
2525
- name: Clojure deps cache
26-
uses: actions/cache@v3
26+
uses: actions/cache@v4
2727
with:
2828
path: |
2929
~/.m2/repository
@@ -33,14 +33,14 @@ runs:
3333
restore-keys: ${{ runner.os }}-${{ inputs.clj-cache-prefix }}
3434

3535
- name: Setup Java
36-
uses: actions/setup-java@v3
36+
uses: actions/setup-java@v4
3737
with:
3838
distribution: 'temurin'
3939
java-version: ${{ inputs.jdk }}
4040
if: inputs.jdk != 'skip'
4141

4242
- name: Install Babashka
43-
uses: DeLaGuardo/setup-clojure@10.1
43+
uses: DeLaGuardo/setup-clojure@12.4
4444
with:
4545
bb: 'latest'
4646

@@ -54,7 +54,7 @@ runs:
5454
if: runner.os == 'Windows'
5555

5656
- name: Install Clojure (macos, linux)
57-
uses: DeLaGuardo/setup-clojure@10.1
57+
uses: DeLaGuardo/setup-clojure@12.4
5858
with:
5959
cli: 'latest'
6060
if: runner.os != 'Windows'

.github/workflows/unit-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
if: contains( matrix.requires, 'planck' )
6161

6262
- name: Node modules cache
63-
uses: actions/cache@v3
63+
uses: actions/cache@v4
6464
with:
6565
path: ./node_modules
6666
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}

bb.edn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
lint {:task lint/-main :doc "[--rebuild] lint source code using clj-kondo, eastwood"}
2121
-lint-kondo {:task lint-kondo/-main :doc "[--rebuild]"}
2222
-lint-eastwood {:task lint-eastwood/-main}
23-
test-clj {:task test-clj/-main :doc "[--clojure-version (1.8|1.9|1.10|1.11)]"}
23+
test-clj {:task test-clj/-main :doc "[--clojure-version (1.8|1.9|1.10|1.11|1.12)]"}
2424
test-cljs {:task test-cljs/-main :doc "use --help for args"}
2525
test-shadow-cljs {:task test-shadow-cljs/-main}
2626
test-native {:task test-native/-main :doc "run rewrite-clj and tests after both compiled with GraalVM native-image"}

deps.edn

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
:1.10 {:override-deps {org.clojure/clojure {:mvn/version "1.10.3"}}}
1919
:1.11 {:override-deps {org.clojure/clojure {:mvn/version "1.11.1"}}}
2020

21+
;; Clojure pre-release to test against
22+
:1.12 {:override-deps {org.clojure/clojure {:mvn/version "1.12.0-alpha7"}}}
23+
2124
;;
2225
;; ClojureScript version we test with (and support)
2326
;;

script/test_clj.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[helper.shell :as shell]
66
[lread.status-line :as status]))
77

8-
(def allowed-clojure-versions '("1.8" "1.9" "1.10" "1.11"))
8+
(def allowed-clojure-versions '("1.8" "1.9" "1.10" "1.11" "1.12"))
99

1010
(defn run-unit-tests [clojure-version]
1111
(status/line :head (str "testing clojure source against clojure v" clojure-version))
@@ -28,7 +28,7 @@
2828
(def args-usage "Valid args: [options]
2929
3030
Options:
31-
-v, --clojure-version VERSION Test with Clojure [1.8, 1.9, 1.10, 1.11 all] [default: 1.8]
31+
-v, --clojure-version VERSION Test with Clojure [1.8, 1.9, 1.10, 1.11, 1.12 all] [default: 1.8]
3232
--help Show this help")
3333

3434
(defn -main [& args]

script/test_libs.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@
393393
:show-deps-fn cli-deps-tree
394394
:test-cmds ["clojure -M:test"]}
395395
{:name "refactor-nrepl"
396-
:version "3.9.0"
396+
:version "3.9.1"
397397
:platforms [:clj]
398398
:github-release {:repo "clojure-emacs/refactor-nrepl"
399399
:via :tag

script/test_native.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
"-m" "clj-graal.gen-test-runner"
1818
"--dest-dir" dir "test-by-namespace"))
1919

20-
(def allowed-clojure-versions '("1.10" "1.11"))
20+
(def allowed-clojure-versions '("1.10" "1.11" "1.12"))
2121

2222
(def args-usage "Valid args: [options]
2323
2424
Options:
25-
-v, --clojure-version VERSION Test with Clojure [1.10, 1.11] [default: 1.11]
25+
-v, --clojure-version VERSION Test with Clojure [1.10, 1.11, 1.12] [default: 1.11]
2626
--help Show this help")
2727

2828

script/test_native_sci.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424
(status/die 1 "native image %s not found." exe-fname))
2525
(shell/command exe-fname "--file" "script/sci_test_runner.clj" "--classpath" "test"))
2626

27-
(def allowed-clojure-versions '("1.10" "1.11"))
27+
(def allowed-clojure-versions '("1.10" "1.11" "1.12"))
2828

2929
(def args-usage "Valid args: [options]
3030
3131
Options:
32-
-v, --clojure-version VERSION Test with Clojure [1.10, 1.11] [default: 1.11]
32+
-v, --clojure-version VERSION Test with Clojure [1.10, 1.11, 1.12] [default: 1.11]
3333
--help Show this help")
3434

3535

0 commit comments

Comments
 (0)