Skip to content

Commit

Permalink
feat: auto instrument for tests and coverage checks also
Browse files Browse the repository at this point in the history
  • Loading branch information
erdos committed Jul 20, 2024
1 parent bf81dd9 commit d8cb6c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
:coverage
{:extra-deps {cloverage/cloverage {:mvn/version "1.2.4"}}
:extra-paths ["test" "test-resources"]
:main-opts ["-m" "cloverage.coverage"
:main-opts ["-e" "((requiring-resolve 'stencil.spec/instrument))"
"-m" "cloverage.coverage"
"--codecov"
"-p" "src" "-s" "test"]}

Expand All @@ -30,7 +31,7 @@
:extra-deps {lambdaisland/kaocha {:mvn/version "1.87.1366"}
lambdaisland/kaocha-junit-xml {:mvn/version "1.17.101"}
org.slf4j/slf4j-simple {:mvn/version "1.7.32"}}
:main-opts ["-e" "(require 'stencil.spec) ((requiring-resolve 'clojure.spec.test.alpha/instrument))"
:main-opts ["-e" "((requiring-resolve 'stencil.spec/instrument))"
"-m" "kaocha.runner"
"--plugin" "kaocha.plugin/junit-xml"
"--junit-xml-file" "target/surefire-reports/kaocha.xml"]
Expand Down
2 changes: 2 additions & 0 deletions src/stencil/spec.clj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
[stencil.model.relations :as relations]
[stencil.process]))

(defn instrument []
((requiring-resolve 'clojure.spec.test.alpha/instrument)))

Check warning on line 9 in src/stencil/spec.clj

View check run for this annotation

Codecov / codecov/patch

src/stencil/spec.clj#L9

Added line #L9 was not covered by tests

;; TODO
(s/def :stencil.model/mode #{"External"})
Expand Down

0 comments on commit d8cb6c0

Please sign in to comment.