Skip to content

Commit d5616e5

Browse files
authored
Merge pull request #70 from plotly/circle-update
Update circle to version 2.
2 parents 0dc6f33 + f216dab commit d5616e5

File tree

4 files changed

+73
-52
lines changed

4 files changed

+73
-52
lines changed

.circleci/config.yml

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
version: 2
2+
3+
jobs:
4+
"python-2.7": &test-template
5+
docker:
6+
- image: circleci/python:2.7-stretch-node-browsers
7+
environment:
8+
PERCY_PARALLEL_TOTAL: 2
9+
10+
working_directory: ~/repo
11+
12+
steps:
13+
- checkout
14+
15+
- run:
16+
name: Set PERCY_NONCE
17+
command: echo export PERCY_PARALLEL_NONCE=$CIRCLE_WORKFLOW_ID >> $HOME/.circlerc
18+
19+
- run:
20+
name: Write Job name
21+
command: echo $CIRCLE_JOB > circlejob.txt
22+
23+
- restore_cache:
24+
key: deps1-{{ .Branch }}-{{ checksum "dev-requirements.txt" }}-{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }}-{{ checksum "circlejob.txt" }}
25+
26+
- run:
27+
name: Install dependencies
28+
command: |
29+
sudo pip install virtualenv --upgrade
30+
python -m venv venv || virtualenv venv
31+
. venv/bin/activate
32+
pip install -r dev-requirements.txt --quiet
33+
npm install --ignore-scripts
34+
35+
- run:
36+
name: Build
37+
command: npm run build-prod
38+
39+
- save_cache:
40+
key: deps1-{{ .Branch }}-{{ checksum "dev-requirements.txt" }}-{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }}-{{ checksum "circlejob.txt" }}
41+
paths:
42+
- "venv"
43+
- "node_modules"
44+
45+
- run:
46+
name: Npm test
47+
command: npm test
48+
49+
- run:
50+
name: Run tests
51+
command: |
52+
. venv/bin/activate
53+
python --version
54+
python -m unittest tests.test_render.Tests
55+
python -m unittest tests.test_race_conditions.Tests
56+
57+
"python-3.6":
58+
<<: *test-template
59+
docker:
60+
- image: circleci/python:3.6-stretch-node-browsers
61+
62+
"python-3.7":
63+
<<: *test-template
64+
docker:
65+
- image: circleci/python:3.7-stretch-node-browsers
66+
67+
workflows:
68+
version: 2
69+
build:
70+
jobs:
71+
- "python-2.7"
72+
- "python-3.6"
73+
- "python-3.7"

circle.yml

-24
This file was deleted.

dev-requirements.txt

-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ dash==0.18.3
44
percy
55
selenium
66
mock
7-
tox
87
six

tox.ini

-27
This file was deleted.

0 commit comments

Comments
 (0)