Skip to content

Commit fef704b

Browse files
authored
[WIP ] Circle ci (#23)
Added CircleCI
1 parent 9514860 commit fef704b

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

.circleci/config.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Javascript Node CircleCI 2.0 configuration file
2+
#
3+
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
4+
#
5+
version: 2
6+
jobs:
7+
build:
8+
docker:
9+
# specify the version you desire here
10+
- image: circleci/node:7.10
11+
12+
# Specify service dependencies here if necessary
13+
# CircleCI maintains a library of pre-built images
14+
# documented at https://circleci.com/docs/2.0/circleci-images/
15+
# - image: circleci/mongo:3.4.4
16+
17+
working_directory: ~/repo
18+
19+
steps:
20+
- checkout
21+
22+
# Download and cache dependencies
23+
- restore_cache:
24+
keys:
25+
- v1-dependencies-{{ checksum "package.json" }}
26+
# fallback to using the latest cache if no exact match is found
27+
- v1-dependencies-
28+
29+
- run: npm install
30+
31+
- save_cache:
32+
paths:
33+
- node_modules
34+
key: v1-dependencies-{{ checksum "package.json" }}
35+
36+
- run: ./bin/ensure_engine_config.sh
37+
38+
# run tests!
39+
- run: npm test

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# App Search Reference UI
22

3+
[![CircleCI](https://circleci.com/gh/swiftype/app-search-reference-ui-react.svg?style=svg)](https://circleci.com/gh/swiftype/app-search-reference-ui-react)
4+
35
The Reference UI is a configurable, generic UI meant to work with
46
any [App Search](https://www.elastic.co/cloud/search-lib-service) Engine. It
57
can serve as a simple demo, a functional test for your Engine data,

bin/ensure_engine_config.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
project_root=$( cd "$(dirname "${BASH_SOURCE[0]}")/.." ; pwd -P )
2+
3+
if [[ ! -e ${project_root}/src/config/engine.json ]]; then
4+
echo "{}" > src/config/engine.json
5+
echo "wrote empty engine.json"
6+
else
7+
echo "engine.json already exists"
8+
fi

0 commit comments

Comments
 (0)