summaryrefslogtreecommitdiff
path: root/scripts/ci
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/ci')
-rw-r--r--scripts/ci/coverage_badge.clj36
1 files changed, 18 insertions, 18 deletions
diff --git a/scripts/ci/coverage_badge.clj b/scripts/ci/coverage_badge.clj
index a8a0948..4cb5947 100644
--- a/scripts/ci/coverage_badge.clj
+++ b/scripts/ci/coverage_badge.clj
@@ -7,25 +7,25 @@
(def cloverage-output "target/coverage/index.html")
(def coverage (let [rows (-> cloverage-output
- slurp
- h/parse
- h/as-hickory
- :content first ;; get <html>
- :content (nth 3) ;; get <body>
- :content second ;; get <table>
- :content last ;; get <tbody>
- :content)
- total-row (->> rows
- (map :content)
- (filter sequential?)
- (filter #(= "Totals:" (get-in % [0 :content 0])))
- first
- (filter map?))]
+ slurp
+ h/parse
+ h/as-hickory
+ :content first ;; get <html>
+ :content (nth 3) ;; get <body>
+ :content second ;; get <table>
+ :content last ;; get <tbody>
+ :content)
+ total-row (->> rows
+ (map :content)
+ (filter sequential?)
+ (filter #(= "Totals:" (get-in % [0 :content 0])))
+ first
+ (filter map?))]
(-> total-row
- (nth 2)
- :content
- first
- (string/replace " " ""))))
+ (nth 2)
+ :content
+ first
+ (string/replace " " ""))))
;; "25" will make "%25" which decoded to "%", removing it will result in a Bad Request
(def badge-url (str "https://img.shields.io/badge/coverage-" coverage "25-green"))
(def badge-html