Skip to content

Commit 4d042ca

Browse files
authored
Merge pull request #114 from plotly/circleci
add circleCI integration
2 parents cdd1bad + 6007b7c commit 4d042ca

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

.circleci/config.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
version: 2.0
2+
3+
jobs:
4+
build:
5+
docker:
6+
- image: circleci/node:10.9.0
7+
working_directory: ~/react-plotly.js
8+
steps:
9+
- checkout
10+
- restore_cache:
11+
keys:
12+
- v{{ .Environment.CIRCLE_CACHE_VERSION }}-deps-{{ .Branch }}-{{ checksum "package-lock.json" }}
13+
- v{{ .Environment.CIRCLE_CACHE_VERSION }}-deps-master-{{ checksum "package-lock.json" }}
14+
- run:
15+
name: Install dependencies
16+
command: |
17+
npm install
18+
- run:
19+
name: List dependency versions
20+
command: |
21+
echo "npm: $(npm --version)"
22+
echo "node: $(node --version)"
23+
npm ls || true
24+
- save_cache:
25+
paths:
26+
- node_modules
27+
key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-deps-{{ .Branch }}-{{ checksum "package.json" }}
28+
- persist_to_workspace:
29+
root: .
30+
paths:
31+
- node_modules
32+
33+
test:
34+
docker:
35+
- image: circleci/node:10.9.0
36+
working_directory: ~/react-plotly.js
37+
steps:
38+
- checkout
39+
- attach_workspace:
40+
at: ~/react-plotly.js
41+
- run:
42+
name: Run tests
43+
command: npm run test
44+
45+
workflows:
46+
version: 2
47+
build-and-test:
48+
jobs:
49+
- build
50+
- test:
51+
requires:
52+
- build

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ npm-debug.log*
44
*.sublime*
55

66
.*
7+
!.circleci
78
!.gitignore
89
!.gitattributes
910
!.npmignore

0 commit comments

Comments
 (0)