-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Of note: - address new clj-kondo findings (dynamic tests vars were uninitialized).
- Loading branch information
Showing
8 changed files
with
61 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
{:hooks | ||
{:analyze-call {org.httpkit.server/with-channel httpkit.with-channel/with-channel}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
(ns httpkit.with-channel | ||
(:require [clj-kondo.hooks-api :as api])) | ||
|
||
(defn with-channel [{node :node}] | ||
(let [[request channel & body] (rest (:children node))] | ||
(when-not (and request channel) (throw (ex-info "No request or channel provided" {}))) | ||
(when-not (api/token-node? channel) (throw (ex-info "Missing channel argument" {}))) | ||
(let [new-node | ||
(api/list-node | ||
(list* | ||
(api/token-node 'let) | ||
(api/vector-node [channel (api/vector-node [])]) | ||
request | ||
body))] | ||
|
||
{:node new-node}))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,15 +13,15 @@ jobs: | |
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Git User so that we can later commit | ||
uses: fregante/[email protected] | ||
|
||
- name: Clojure deps cache | ||
uses: actions/cache@v3 | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.m2/repository | ||
|
@@ -31,13 +31,13 @@ jobs: | |
restore-keys: cljdeps- | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '11' | ||
|
||
- name: Install Clojure Tools | ||
uses: DeLaGuardo/setup-clojure@10.3 | ||
uses: DeLaGuardo/setup-clojure@12.5 | ||
with: | ||
bb: 'latest' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
{:paths ["src" "resources"] | ||
:deps {org.clojure/clojure {:mvn/version "1.9.0"} ;; min clojure version | ||
babashka/fs {:mvn/version "0.3.17"} | ||
babashka/process {:mvn/version "0.4.16"} | ||
babashka/fs {:mvn/version "0.5.20"} | ||
babashka/process {:mvn/version "0.5.22"} | ||
clj-http/clj-http {:mvn/version "3.12.3"} ;; for jvm use | ||
org.clj-commons/clj-http-lite {:mvn/version "1.0.13"} ;; for babashka use | ||
slingshot/slingshot {:mvn/version "0.12.2"} | ||
cheshire/cheshire {:mvn/version "5.11.0"} | ||
org.clojure/tools.cli {:mvn/version "1.0.214"} | ||
org.clojure/tools.logging {:mvn/version "1.2.4"}} | ||
cheshire/cheshire {:mvn/version "5.12.0"} | ||
org.clojure/tools.cli {:mvn/version "1.1.230"} | ||
org.clojure/tools.logging {:mvn/version "1.3.0"}} | ||
:aliases | ||
{:1.11 {:replace-deps {org.clojure/clojure {:mvn/version "1.11.1"}}} | ||
{:1.11 {:replace-deps {org.clojure/clojure {:mvn/version "1.11.2"}}} | ||
:1.12 {:replace-deps {org.clojure/clojure {:mvn/version "1.12.0-alpha9"}}} | ||
:debug {:extra-paths ["env/dev/resources"]} | ||
:test {:extra-paths ["test" "env/test/resources"] | ||
:extra-deps {io.github.cognitect-labs/test-runner {:git/tag "v0.5.1" :git/sha "dfb30dd"} | ||
org.babashka/cli {:mvn/version "0.7.51"} | ||
ch.qos.logback/logback-classic {:mvn/version "1.4.7"} | ||
org.babashka/cli {:mvn/version "0.8.58"} | ||
ch.qos.logback/logback-classic {:mvn/version "1.3.14"} | ||
;; for http-client which uses apache http client 4.x which uses commons logging | ||
org.slf4j/jcl-over-slf4j {:mvn/version "2.0.7"}} | ||
org.slf4j/jcl-over-slf4j {:mvn/version "2.0.12"}} | ||
:exec-fn cognitect.test-runner.api/test | ||
:org.babashka/cli {:coerce {:nses [:symbol] | ||
:patterns [:string] | ||
|
@@ -25,15 +26,15 @@ | |
:script {:extra-paths ["script"]} | ||
|
||
;; test-doc-blocks - gen tests | ||
:test-doc-blocks {:replace-deps {org.clojure/clojure {:mvn/version "1.11.1"} | ||
:test-doc-blocks {:replace-deps {org.clojure/clojure {:mvn/version "1.11.2"} | ||
com.github.lread/test-doc-blocks {:mvn/version "1.0.166-alpha"}} | ||
:replace-paths [] | ||
:ns-default lread.test-doc-blocks | ||
:exec-args {:docs ["doc/01-user-guide.adoc"]}} | ||
|
||
;; test-doc-blocks - run tests | ||
;; usage: test:test-docs | ||
:test-docs {:override-deps {org.clojure/clojure {:mvn/version "1.11.1"}} | ||
:test-docs {:override-deps {org.clojure/clojure {:mvn/version "1.11.2"}} | ||
:extra-paths ["target/test-doc-blocks/test"] | ||
:exec-fn cognitect.test-runner.api/test | ||
:exec-args {:dirs ["target/test-doc-blocks/test"]} | ||
|
@@ -43,23 +44,26 @@ | |
:main-opts ["-m" "babashka.cli.exec"]} | ||
|
||
;; for consistent linting we use a specific version of clj-kondo through the jvm | ||
:clj-kondo {:extra-deps {clj-kondo/clj-kondo {:mvn/version "2023.04.14"}} | ||
:clj-kondo {:extra-deps {clj-kondo/clj-kondo {:mvn/version "2024.03.13"}} | ||
:main-opts ["-m" "clj-kondo.main"]} | ||
|
||
:build {:deps {io.github.clojure/tools.build {:mvn/version "0.9.4"} | ||
slipset/deps-deploy {:mvn/version "0.2.1"}} | ||
:build {:deps {io.github.clojure/tools.build {:mvn/version "0.10.0"} | ||
slipset/deps-deploy {:mvn/version "0.2.2"}} | ||
:ns-default build} | ||
|
||
:outdated {:extra-deps {com.github.liquidz/antq {:mvn/version "2.3.1043"} | ||
:outdated {:extra-deps {com.github.liquidz/antq {:mvn/version "2.8.1185"} | ||
org.clojure/clojure {:mvn/version "1.11.1"} | ||
org.slf4j/slf4j-simple {:mvn/version "2.0.7"} ;; to rid ourselves of logger warnings | ||
org.slf4j/slf4j-simple {:mvn/version "2.0.12"} ;; to rid ourselves of logger warnings | ||
} | ||
:main-opts ["-m" "antq.core"]} | ||
:main-opts ["-m" "antq.core" | ||
"--exclude=ch.qos.logback/[email protected]" ;; requires min jdk 11, we are currently jdk8 compatible | ||
"--exclude=ch.qos.logback/[email protected]" ;; requires min jdk 11, we are currently jdk8 compatible | ||
]} | ||
|
||
:repl/cider | ||
{:extra-deps {nrepl/nrepl {:mvn/version "1.0.0"} | ||
cider/cider-nrepl {:mvn/version "0.30.0"} | ||
refactor-nrepl/refactor-nrepl {:mvn/version "3.6.0"}} | ||
{:extra-deps {nrepl/nrepl {:mvn/version "1.1.1"} | ||
cider/cider-nrepl {:mvn/version "0.47.0"} | ||
refactor-nrepl/refactor-nrepl {:mvn/version "3.10.0"}} | ||
:jvm-opts ["-XX:-OmitStackTraceInFastThrow"] | ||
:main-opts ["-m" "nrepl.cmdline" | ||
"--middleware" "[refactor-nrepl.middleware/wrap-refactor,cider.nrepl/cider-middleware]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
(ns etaoin.test-report | ||
(:require [clojure.test])) | ||
|
||
(def ^:dynamic *context*) | ||
(def ^:dynamic *context* nil) | ||
|
||
(def platform | ||
(if (System/getProperty "babashka.version") "bb" "jvm")) | ||
|
||
(defmethod clojure.test/report :begin-test-var [m] | ||
(let [test-name (-> m :var meta :name)] | ||
(if (bound? #'*context*) | ||
(if *context* | ||
(println (format "=== %s [%s][%s]" test-name platform *context*)) | ||
(println (format "=== %s [%s]" test-name platform))))) |