Skip to content

Commit fb64516

Browse files
authored
Merge pull request #14 from plotly/cookie-cutter
[WIP] cookiecutter for the boilerplate
2 parents eaceef1 + ab9263d commit fb64516

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1358
-629
lines changed

.circleci/config.yml

Lines changed: 18 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,28 @@
11
version: 2
22

33
jobs:
4-
"node":
4+
"python-3.6": &test-template
55
docker:
6-
- image: circleci/node:8.11.3
7-
8-
steps:
9-
- checkout
10-
11-
- restore_cache:
12-
key: deps1-{{ .Branch }}-{{ checksum "package.json" }}
13-
14-
- run:
15-
name: Install package.json
16-
command: npm i
17-
18-
- save_cache:
19-
key: deps1-{{ .Branch }}-{{ checksum "package.json" }}
20-
paths:
21-
- node_modules
22-
23-
- run:
24-
name: Run eslint
25-
command: ./node_modules/.bin/eslint src
26-
when: always
27-
28-
29-
"python-3.6":
30-
docker:
31-
- image: circleci/python:3.6-stretch-browsers
6+
- image: circleci/python:3.6-stretch-node-browsers
327

338
environment:
34-
PERCY_ENABLED: False
9+
PERCY_ENABLE: 0
3510

3611
steps:
3712
- checkout
3813

14+
- run:
15+
name: Write job name.
16+
command: echo $CIRCLE_JOB > circlejob.txt
17+
3918
- restore_cache:
40-
key: deps1-{{ .Branch }}-{{ checksum "tests/requirements.txt" }}
19+
key: deps1-{{ .Branch }}-{{ checksum "circlejob.txt" }}-{{ checksum "tests/requirements.txt" }}-{{ checksum ".circleci/config.yml" }}
4120

4221
- run:
4322
name: Create virtualenv
4423
command: |
45-
python3 -m venv venv
24+
sudo pip install virtualenv
25+
python -m venv venv || virtualenv venv
4626
4727
- run:
4828
name: Install requirements
@@ -51,35 +31,26 @@ jobs:
5131
pip install -r tests/requirements.txt --quiet
5232
5333
- save_cache:
54-
key: deps1-{{ .Branch }}-{{ checksum "tests/requirements.txt" }}
34+
key: deps1-{{ .Branch }}-{{ checksum "circlejob.txt" }}-{{ checksum "tests/requirements.txt" }}-{{ checksum ".circleci/config.yml" }}
5535
paths:
5636
- "venv"
5737

5838
- run:
59-
name: Run pylint
60-
command: |
61-
. venv/bin/activate
62-
pylint usage.py tests
63-
when: always
64-
65-
- run:
66-
name: Run flake8
39+
name: Generations tests
6740
command: |
6841
. venv/bin/activate
69-
flake8 usage.py tests
42+
pytest tests --driver Chrome
7043
when: always
7144

72-
- run:
73-
name: Integration Tests
74-
command: |
75-
. venv/bin/activate
76-
python -m unittest tests.test_render
77-
when: always
45+
"python-2.7":
46+
<<: *test-template
47+
docker:
48+
- image: circleci/python:2.7-stretch-node-browsers
7849

7950

8051
workflows:
8152
version: 2
8253
build:
8354
jobs:
8455
- "python-3.6"
85-
- "node"
56+
- "python-2.7"

0 commit comments

Comments
 (0)