Skip to content

Commit

Permalink
Run tests with JVM in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
PEZ committed Nov 25, 2024
1 parent 81a21e6 commit ba1e402
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ jobs:
set -x
npm run test
- name: Run view tests with JVM Clojure
run: |
set -x
bb run-view-tests-jvm
- name: Copy to app folder
run: |
set -x
Expand Down
6 changes: 5 additions & 1 deletion bb.edn
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@

copy-to-app-dir
{:task t/copy-to-app-dir!
:doc "Package the built TodoMVC app to `./replicant-todomvc`"}}}
:doc "Package the built TodoMVC app to `./replicant-todomvc`"}

run-tests-jvm
{:task t/run-tests-jvm!
:doc "Run the tests with JVM Clojure"}}}
14 changes: 13 additions & 1 deletion scripts/tasks.clj
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,16 @@
["README.md"]
["stateless-data-driven-uis.png"]
["LICENSE.md"]])
(p/shell "tree" app-dir)))
(p/shell "tree" app-dir)))
;(require 'todomvc.views-test)
(defn ^:export run-tests-jvm! []
(println "Running view tests with JVM Clojure...")
(let [command ["clojure" "-M:test" "-e"
"(require 'clojure.test)
(require 'pez.baldr)
(require 'todomvc.views-test)
(require 'todomvc.actions-test)
(clojure.test/run-tests 'todomvc.views-test 'todomvc.actions-test)"]
{:keys [err exit]} (apply p/shell command)]
(when-not (zero? exit)
(println err))))

0 comments on commit ba1e402

Please sign in to comment.