File tree Expand file tree Collapse file tree 2 files changed +30
-4
lines changed Expand file tree Collapse file tree 2 files changed +30
-4
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,32 @@ name: Libs Test
3
3
on : [push, pull_request]
4
4
5
5
jobs :
6
+ enumerate-libs :
7
+ runs-on : ubuntu-latest
8
+
9
+ outputs :
10
+ libs : ${{ steps.set-libs.outputs.libs }}
11
+
12
+ steps :
13
+ - uses : actions/checkout@v3
14
+
15
+ - name : Install babashka
16
+ uses :
turtlequeue/[email protected]
17
+ with :
18
+ babashka-version : 0.8.1
19
+
20
+ - id : set-libs
21
+ name : Set libs var for matrix
22
+ # # call bb script directly instead of as task to avoid task status output
23
+ run : echo "::set-output name=libs::$(bb script/test_libs.clj list --format=json)"
24
+
6
25
libs-test :
26
+ needs : enumerate-libs
7
27
runs-on : ubuntu-latest
28
+ strategy :
29
+ fail-fast : false
30
+ matrix :
31
+ lib : ${{fromJSON(needs.enumerate-libs.outputs.libs)}}
8
32
9
33
steps :
10
34
- uses : actions/checkout@v3
36
60
- name : Install babashka
37
61
uses :
turtlequeue/[email protected]
38
62
with :
39
- babashka-version : 0.7.8
63
+ babashka-version : 0.8.1
40
64
41
65
- name : Install Clojure
42
66
run : curl -s https://download.clojure.org/install/linux-install-1.10.3.986.sh | sudo bash
55
79
planck --version
56
80
57
81
- name : Run Libs Tests
58
- run : bb test-libs run
82
+ run : bb test-libs run $${ matrix.lib }
Original file line number Diff line number Diff line change 509
509
0 1 ))))))
510
510
511
511
(def args-usage " Valid args:
512
- list
512
+ list [--format=json]
513
513
run [<lib-name>...]
514
514
outdated [<lib-name>...]
515
515
--help
@@ -528,7 +528,9 @@ Specifying no lib-names selects all libraries.")
528
528
(when-let [opts (main/doc-arg-opt args-usage args)]
529
529
(cond
530
530
(get opts " list" )
531
- (status/line :detail (str " available libs: " (string/join " " (map :name libs))))
531
+ (if (= " json" (get opts " --format" ))
532
+ (status/line :detail (->> libs (map :name ) json/generate-string))
533
+ (status/line :detail (str " available libs: " (string/join " " (map :name libs)))))
532
534
533
535
:else
534
536
(let [lib-names (get opts " <lib-name>" )
You can’t perform that action at this time.
0 commit comments