-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2310 from plotly/circle2
Test with CircleCI 2.0
- Loading branch information
Showing
8 changed files
with
130 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
version: 2.0 | ||
|
||
# Inspired by: | ||
# https://github.com/CircleCI-Public/circleci-demo-workflows/blob/workspace-forwarding/.circleci/config.yml | ||
# https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs | ||
|
||
jobs: | ||
build: | ||
docker: | ||
- image: circleci/node:6.10.3 | ||
working_directory: ~/plotly.js | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- v{{ .Environment.CIRCLE_CACHE_VERSION }}-deps-{{ .Branch }}-{{ checksum "package.json" }} | ||
- v{{ .Environment.CIRCLE_CACHE_VERSION }}-deps-master-{{ checksum "package.json" }} | ||
- run: | ||
name: Install dependencies | ||
command: | | ||
npm install | ||
npm dedupe | ||
npm prune | ||
npm install | ||
- run: | ||
name: List dependency versions | ||
command: | | ||
echo "npm: $(npm --version)" | ||
echo "node: $(node --version)" | ||
npm ls || true | ||
- run: | ||
name: Pretest | ||
command: | | ||
npm run pretest | ||
npm run cibuild | ||
- save_cache: | ||
paths: | ||
- node_modules | ||
key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-deps-{{ .Branch }}-{{ checksum "package.json" }} | ||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- node_modules | ||
- build | ||
- dist | ||
|
||
test-jasmine: | ||
docker: | ||
# need '-browsers' version to test in real (xvfb-wrapped) browsers | ||
- image: circleci/node:6.10.3-browsers | ||
working_directory: ~/plotly.js | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: ~/plotly.js | ||
- run: | ||
name: Set timezone to Alaska time (arbitrary timezone to test date logic) | ||
command: | | ||
sudo cp /usr/share/zoneinfo/America/Anchorage /etc/localtime | ||
- run: | ||
name: Run jasmine tests | ||
command: ./.circleci/test.sh jasmine | ||
|
||
test-image: | ||
docker: | ||
- image: plotly/testbed:latest | ||
working_directory: /var/www/streambed/image_server/plotly.js/ | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: /var/www/streambed/image_server/plotly.js/ | ||
- run: | ||
name: Run and setup container | ||
command: | | ||
supervisord & | ||
npm run docker -- setup | ||
- run: | ||
name: Run image tests | ||
command: ./.circleci/test.sh image | ||
- store_artifacts: | ||
path: build | ||
|
||
test-syntax: | ||
docker: | ||
- image: circleci/node:6.10.3 | ||
working_directory: ~/plotly.js | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: ~/plotly.js | ||
- run: | ||
name: Run syntax tests | ||
command: ./.circleci/test.sh syntax | ||
|
||
workflows: | ||
version: 2 | ||
build-and-test: | ||
jobs: | ||
- build | ||
- test-jasmine: | ||
requires: | ||
- build | ||
- test-image: | ||
requires: | ||
- build | ||
- test-syntax: | ||
requires: | ||
- build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ npm-debug.log* | |
*.sublime* | ||
|
||
.* | ||
!.circleci | ||
!.gitignore | ||
!.npmignore | ||
!.eslintrc | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters