Skip to content

add circleCI integration #114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
version: 2.0

jobs:
build:
docker:
- image: circleci/node:10.9.0
working_directory: ~/react-plotly.js
steps:
- checkout
- restore_cache:
keys:
- v{{ .Environment.CIRCLE_CACHE_VERSION }}-deps-{{ .Branch }}-{{ checksum "package-lock.json" }}
- v{{ .Environment.CIRCLE_CACHE_VERSION }}-deps-master-{{ checksum "package-lock.json" }}
- run:
name: Install dependencies
command: |
npm install
- run:
name: List dependency versions
command: |
echo "npm: $(npm --version)"
echo "node: $(node --version)"
npm ls || true
- save_cache:
paths:
- node_modules
key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-deps-{{ .Branch }}-{{ checksum "package.json" }}
- persist_to_workspace:
root: .
paths:
- node_modules

test:
docker:
- image: circleci/node:10.9.0
working_directory: ~/react-plotly.js
steps:
- checkout
- attach_workspace:
at: ~/react-plotly.js
- run:
name: Run tests
command: npm run test

workflows:
version: 2
build-and-test:
jobs:
- build
- test:
requires:
- build
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ npm-debug.log*
*.sublime*

.*
!.circleci
!.gitignore
!.gitattributes
!.npmignore
Expand Down