Away from computer, right now, but I seem to remember to have done something like this for one of the clj-commons cljs-projects.
Since we're all here: any advice on how to setup Firefox headless on the macOS environment in CircleCI?
Btw, if you find yourself repeating things a lot between steps/jobs, consider generating the config.yml from Clojure. It's much more fun. https://github.com/babashka/pod-babashka-etaoin/blob/master/script/generate_circleci.clj