Run CLJS tests in Circle

This commit is contained in:
Miikka Koskinen 2018-03-13 14:40:38 +02:00
parent 65b8acb493
commit 646c341ac6
5 changed files with 993 additions and 6 deletions

View file

@ -1,6 +1,6 @@
version: 2
jobs:
test:
test-clj:
working_directory: ~/test
docker:
- image: clojure:lein-2.7.1
@ -8,7 +8,8 @@ jobs:
- checkout
- restore_cache:
keys:
- 'v1-test-{{ checksum "project.clj" }}'
- 'v1-clj-{{ checksum "project.clj" }}'
- 'v1-clj-'
- 'v1-test-'
- run:
name: Install modules
@ -24,10 +25,37 @@ jobs:
# name: Run coverage
# command: ./scripts/submit-to-coveralls.sh clj
- save_cache:
key: 'v1-test-{{ checksum "project.clj" }}'
key: 'v1-clj-{{ checksum "project.clj" }}'
paths:
- ~/.m2
test-cljs:
working_directory: ~/test
docker:
- image: circleci/clojure:lein-2.8.1-node-browsers
steps:
- checkout
- restore_cache:
keys:
- 'v1-cljs-{{ checksum "project.clj" }}-{{ checksum "package.json" }}'
- 'v1-cljs-'
- run:
name: Install npm dependencies
command: npm install
- run:
name: Install modules
command: ./scripts/lein-modules install
- run:
name: Run tests
command: ./scripts/test.sh cljs
- store_test_results:
path: ~/test/target/results
- save_cache:
key: 'v1-cljs-{{ checksum "project.clj" }}-{{ checksum "package.json" }}'
paths:
- ~/.m2
- ~/test/node_modules
build-docs:
working_directory: ~/build
docker:
@ -71,7 +99,8 @@ workflows:
version: 2
test-and-build-docs:
jobs:
- test
- test-clj
- test-cljs
- build-docs:
filters:
branches:

952
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -4,6 +4,8 @@
"devDependencies": {
"karma": "^1.7.1",
"karma-chrome-launcher": "^2.2.0",
"karma-cljs-test": "^0.1.0"
"karma-cli": "^1.0.1",
"karma-cljs-test": "^0.1.0",
"karma-junit-reporter": "^1.2.0"
}
}

View file

@ -79,6 +79,11 @@
{:type :junit
:output-to "target/results/reitit/junit.xml"}]}
:doo {:paths {:karma "./node_modules/.bin/karma"}
:karma {:config {"plugins" ["karma-junit-reporter"]
"reporters" ["progress", "junit"]
"junitReporter" {"outputDir" "target/results/cljs"}}}}
:cljsbuild {:builds [{:id "test"
:source-paths ["src" "test/cljc" "test/cljs"]
:compiler {:output-to "target/out/test.js"

View file

@ -2,7 +2,6 @@
set -e
case $1 in
cljs)
npm install -g karma-cli
lein "do" test-browser once, test-node once, test-advanced once
;;
clj)