Merge pull request #73 from metosin/from-travis-to-circle

Migrate all tests from Travis to Circle
This commit is contained in:
Miikka Koskinen 2018-03-15 08:39:31 +02:00 committed by GitHub
commit 61a4ee8d36
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 993 additions and 30 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:

View file

@ -1,24 +0,0 @@
sudo: required
language: clojure
lein: 2.7.1
install:
- ./scripts/lein-modules install
- lein deps
- npm install
script:
- ./scripts/test.sh $TEST
# - ./scripts/submit-to-coveralls.sh $TEST
env:
matrix:
- TEST=clj
- TEST=cljs
jdk:
- oraclejdk8
node_js:
- "8"
cache:
directories:
- "$HOME/.m2"
- "node_modules"
addons:
chrome: stable

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)