Skip to content

Commit

Permalink
Use node for tests
Browse files Browse the repository at this point in the history
Don't need/want to do browser tests
  • Loading branch information
cofinley committed Sep 14, 2023
1 parent ca9dca1 commit c3996dc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ jobs:
test:
name: Tests
runs-on: ubuntu-20.04
container:
image: ghcr.io/day8/chrome-latest:5.1.0
steps:
- uses: actions/checkout@v3
- name: npm install
run: 'npm install'
- name: run tests
run: npm run ci
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- run: npm ci
- run: 'npm run ci:node'
21 changes: 11 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@
"name": "why-does-that-sound-good",
"scripts": {
"ancient": "clojure -Sdeps '{:deps {com.github.liquidz/antq {:mvn/version \"RELEASE\"}}}' -m antq.core",
"watch": "npx shadow-cljs watch app karma-test",
"watch": "npx shadow-cljs watch app node-test",
"release": "npx shadow-cljs release app",
"build-report": "npx shadow-cljs run shadow.cljs.build-report app target/build-report.html",
"ci": "npx shadow-cljs compile karma-test && npx karma start --single-run --reporters junit,dots"
},
"dependencies": {
"highlight.js": "11.5.1",
"react": "17.0.2",
"react-dom": "17.0.2"
},
"devDependencies": {
"karma": "6.4.0",
"ci:karma": "npx shadow-cljs compile karma-test && npx karma start --single-run --reporters junit,dots",
"ci:node": "npx shadow-cljs compile node-test && node target/node-test.js"
},
"dependencies": {
"highlight.js": "11.5.1",
"react": "17.0.2",
"react-dom": "17.0.2"
},
"devDependencies": {
"karma": "6.4.0",
"karma-chrome-launcher": "3.1.1",
"karma-cljs-test": "0.1.0",
"karma-junit-reporter": "2.0.1",
Expand Down
5 changes: 4 additions & 1 deletion shadow-cljs.edn
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,7 @@
:karma-test
{:target :karma
:ns-regexp "-test$"
:output-to "target/karma-test.js"}}}
:output-to "target/karma-test.js"}
:node-test
{:target :node-test
:output-to "target/node-test.js"}}}

0 comments on commit c3996dc

Please sign in to comment.