diff --git a/.github/workflows/bean-tests.yml b/.github/workflows/bean-tests.yml new file mode 100644 index 0000000..5256d35 --- /dev/null +++ b/.github/workflows/bean-tests.yml @@ -0,0 +1,22 @@ +name: Bean tests +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x] + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm install + - run: npx shadow-cljs compile test && node tests.js diff --git a/.gitignore b/.gitignore index ee73a81..0a02a39 100644 --- a/.gitignore +++ b/.gitignore @@ -22,5 +22,5 @@ pom.xml.asc .clj-kondo/ .lsp/ output.js -out/ +tests.js .calva/ diff --git a/README.md b/README.md index 6ba2ad3..9f81b33 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ A repository with the accompanying research work will be put up soon. Bean is written in [ClojureScript](https://clojurescript.org/). You'll need [npm and nodejs](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) installed. Then run ``` -npx install +npm install npx shadow-cljs watch ui ``` diff --git a/package.json b/package.json index b8d47c9..4b93eae 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "bean", "version": "0.0.1", "private": true, + "prepare": "husky install", "devDependencies": { "shadow-cljs": "2.25.2" }, diff --git a/shadow-cljs.edn b/shadow-cljs.edn index a1a2218..cc51315 100644 --- a/shadow-cljs.edn +++ b/shadow-cljs.edn @@ -17,6 +17,6 @@ :asset-path "/js" :modules {:main {:entries [bean.ui.main]}}} :test {:target :node-test - :output-to "out/test.js" + :output-to "tests.js" :ns-regexp "-test$" :autorun true}}}