Skip to content

Commit

Permalink
Add a github action to run tests (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
prabhanshuguptagit authored Nov 2, 2023
1 parent 5f1dc1b commit 32380dd
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 3 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/bean-tests.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ pom.xml.asc
.clj-kondo/
.lsp/
output.js
out/
tests.js
.calva/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "bean",
"version": "0.0.1",
"private": true,
"prepare": "husky install",
"devDependencies": {
"shadow-cljs": "2.25.2"
},
Expand Down
2 changes: 1 addition & 1 deletion shadow-cljs.edn
Original file line number Diff line number Diff line change
Expand Up @@ -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}}}

0 comments on commit 32380dd

Please sign in to comment.