mirror of
https://github.com/metosin/reitit.git
synced 2026-02-20 17:29:08 +00:00
Run clj test on circle, fix circle gitbook step?
This commit is contained in:
parent
40fef6bae2
commit
dd8a42862b
2 changed files with 36 additions and 5 deletions
|
|
@ -1,6 +1,29 @@
|
||||||
version: 2
|
version: 2
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
test:
|
||||||
|
working_directory: ~/test
|
||||||
|
docker:
|
||||||
|
- image: clojure:lein-2.7.1
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- restore_cache:
|
||||||
|
keys:
|
||||||
|
- 'v1-test-{{ checksum "project.clj" }}'
|
||||||
|
- 'v1-test-'
|
||||||
|
- run:
|
||||||
|
name: Run tests
|
||||||
|
command: ./scripts/test.sh clj
|
||||||
|
- store_test_results:
|
||||||
|
path: ~/test/target/junit.xml
|
||||||
|
- run:
|
||||||
|
name: Run coverage
|
||||||
|
command: ./scripts/submit-to-coveralls.sh clj
|
||||||
|
- save_cache:
|
||||||
|
key: 'v1-test-{{ checksum "project.clj" }}'
|
||||||
|
paths:
|
||||||
|
- ~/.m2
|
||||||
|
|
||||||
|
build-docs:
|
||||||
working_directory: ~/build
|
working_directory: ~/build
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/node:latest
|
- image: circleci/node:latest
|
||||||
|
|
@ -11,11 +34,11 @@ jobs:
|
||||||
- checkout
|
- checkout
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- 'v1-{{ checksum "book.json" }}'
|
- 'v1-gitbook-{{ checksum "book.json" }}'
|
||||||
- 'v1-'
|
- 'v1-gitbook-'
|
||||||
- run:
|
- run:
|
||||||
name: "Install GitBook"
|
name: "Install GitBook"
|
||||||
command: npm install gitbook-cli && ./node_modules/.bin/gitbook install
|
command: npm install -g gitbook-cli && gitbook install
|
||||||
- run:
|
- run:
|
||||||
name: "Clone gh-pages"
|
name: "Clone gh-pages"
|
||||||
command: git clone --branch gh-pages git@github.com:metosin/reitit.git ~/gh-pages
|
command: git clone --branch gh-pages git@github.com:metosin/reitit.git ~/gh-pages
|
||||||
|
|
@ -37,6 +60,13 @@ jobs:
|
||||||
git commit -m "Build book from commit $CIRCLE_SHA1 [skip ci]"
|
git commit -m "Build book from commit $CIRCLE_SHA1 [skip ci]"
|
||||||
git push
|
git push
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: 'v1-{{ checksum "book.json" }}'
|
key: 'v1-gitbook-{{ checksum "book.json" }}'
|
||||||
paths:
|
paths:
|
||||||
- node_modules
|
- node_modules
|
||||||
|
|
||||||
|
workflows:
|
||||||
|
version: 2
|
||||||
|
test-and-build-docs:
|
||||||
|
jobs:
|
||||||
|
- test
|
||||||
|
- build-docs
|
||||||
|
|
|
||||||
|
|
@ -18,3 +18,4 @@ node_js:
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- "$HOME/.m2"
|
- "$HOME/.m2"
|
||||||
|
- "node_modules"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue