This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-10
Channels
- # announcements (3)
- # babashka (16)
- # beginners (41)
- # biff (4)
- # calva (14)
- # circleci (1)
- # clj-http (24)
- # clj-kondo (9)
- # clj-on-windows (31)
- # cljs-dev (52)
- # clojure (162)
- # clojure-australia (10)
- # clojure-europe (52)
- # clojure-nl (2)
- # clojure-spec (1)
- # clojure-uk (5)
- # clojurescript (40)
- # conjure (6)
- # core-async (3)
- # cursive (5)
- # datalevin (11)
- # datomic (7)
- # emacs (12)
- # etaoin (19)
- # events (1)
- # figwheel-main (17)
- # fulcro (4)
- # graalvm (3)
- # gratitude (13)
- # honeysql (8)
- # introduce-yourself (7)
- # london-clojurians (1)
- # off-topic (9)
- # polylith (9)
- # rdf (1)
- # re-frame (21)
- # releases (5)
- # remote-jobs (4)
- # sci (28)
- # shadow-cljs (15)
- # spacemacs (2)
- # vim (4)
- # xtdb (15)
The poly test
command doesn't recognize circleci's config.clj, has anyone had this experience?
I am using https://github.com/circleci/circleci.test#global-fixtures of circleci. When I do poly test
,it seems that global fixtures are not loaded.
This is my alias
:test {:extra-paths ["test" "test/resources"]
:extra-deps {integrant/repl {:mvn/version "0.3.2"}
circleci/circleci.test {:mvn/version "0.5.0"}
cloverage/cloverage {:mvn/version "1.2.2"}
peridot/peridot {:mvn/version "0.5.3"}
district0x/graphql-query {:mvn/version "1.0.6"}}
:main-opts ["-m" "cloverage.coverage"
"-p" "src" "-s" "test"
"--runner" "circleci.test"]}
clojure -M:test
command works fine.
from your main-opts it appears to me when you run clojure -M:test
it will invoke cloverage, which then will route to a circleci-specific runner. Is that observation correct?
I'm not familiar with circleci's runner, but I think that is the piece that "knows" about that config.clj you mentioned.
Out of the box poly test
is unaware of circleci (and cloverage) and so it doesn't know what to do with that circleci-specific file.
If you depend on this functionality, you might want to implement and plug in a custom test runner that proxies to circleci's own. This has only recently become an option: https://github.com/polyfy/polylith/pull/196 (disclaimer: I'm the author of that PR as I needed that pluggability to connect with the kaocha test runner. I am not a polylith team member however.)
If you decide to go this way, you might decide to take a look at https://github.com/imrekoszo/polylith-kaocha which is the implementation I ended up with.
On the other hand, if the only thing you need from circleci is global fixtures, polylith has a thing called "test setup and teardown" which appear to me to be similar to the global fixtures you mentioned. This is built into polylith, so you won't need a custom test runner to use them. See more at https://polylith.gitbook.io/poly/workflow/testing#test-setup-and-teardown