mirror of
https://github.com/metosin/reitit.git
synced 2025-12-18 17:01:11 +00:00
Run CLJS tests in Circle
This commit is contained in:
parent
65b8acb493
commit
646c341ac6
5 changed files with 993 additions and 6 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
version: 2
|
version: 2
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test-clj:
|
||||||
working_directory: ~/test
|
working_directory: ~/test
|
||||||
docker:
|
docker:
|
||||||
- image: clojure:lein-2.7.1
|
- image: clojure:lein-2.7.1
|
||||||
|
|
@ -8,7 +8,8 @@ jobs:
|
||||||
- checkout
|
- checkout
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- 'v1-test-{{ checksum "project.clj" }}'
|
- 'v1-clj-{{ checksum "project.clj" }}'
|
||||||
|
- 'v1-clj-'
|
||||||
- 'v1-test-'
|
- 'v1-test-'
|
||||||
- run:
|
- run:
|
||||||
name: Install modules
|
name: Install modules
|
||||||
|
|
@ -24,10 +25,37 @@ jobs:
|
||||||
# name: Run coverage
|
# name: Run coverage
|
||||||
# command: ./scripts/submit-to-coveralls.sh clj
|
# command: ./scripts/submit-to-coveralls.sh clj
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: 'v1-test-{{ checksum "project.clj" }}'
|
key: 'v1-clj-{{ checksum "project.clj" }}'
|
||||||
paths:
|
paths:
|
||||||
- ~/.m2
|
- ~/.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:
|
build-docs:
|
||||||
working_directory: ~/build
|
working_directory: ~/build
|
||||||
docker:
|
docker:
|
||||||
|
|
@ -71,7 +99,8 @@ workflows:
|
||||||
version: 2
|
version: 2
|
||||||
test-and-build-docs:
|
test-and-build-docs:
|
||||||
jobs:
|
jobs:
|
||||||
- test
|
- test-clj
|
||||||
|
- test-cljs
|
||||||
- build-docs:
|
- build-docs:
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
|
|
|
||||||
952
package-lock.json
generated
952
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -4,6 +4,8 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"karma": "^1.7.1",
|
"karma": "^1.7.1",
|
||||||
"karma-chrome-launcher": "^2.2.0",
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,11 @@
|
||||||
{:type :junit
|
{:type :junit
|
||||||
:output-to "target/results/reitit/junit.xml"}]}
|
: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"
|
:cljsbuild {:builds [{:id "test"
|
||||||
:source-paths ["src" "test/cljc" "test/cljs"]
|
:source-paths ["src" "test/cljc" "test/cljs"]
|
||||||
:compiler {:output-to "target/out/test.js"
|
:compiler {:output-to "target/out/test.js"
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
set -e
|
set -e
|
||||||
case $1 in
|
case $1 in
|
||||||
cljs)
|
cljs)
|
||||||
npm install -g karma-cli
|
|
||||||
lein "do" test-browser once, test-node once, test-advanced once
|
lein "do" test-browser once, test-node once, test-advanced once
|
||||||
;;
|
;;
|
||||||
clj)
|
clj)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue