Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

Commit 6dc7d87

Browse files
committed
Update circle
1 parent 8120739 commit 6dc7d87

16 files changed

+1499
-7502
lines changed

.circleci/config.yml

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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+
PYTHON_VERSION: py27
9+
10+
working_directory: ~/repo
11+
12+
steps:
13+
- checkout
14+
15+
- run:
16+
name: Write job name
17+
command: echo $CIRCLE_JOB > circlejob.txt
18+
19+
- run:
20+
name: Create venv
21+
command: |
22+
sudo pip install virtualenv --upgrade
23+
python -m venv venv || virtualenv venv
24+
25+
- restore_cache:
26+
key: deps1-{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }}-{{ checksum "circlejob.txt" }}
27+
28+
- run:
29+
name: Install dependencies
30+
command: |
31+
. venv/bin/activate
32+
pip install -r requirements.txt
33+
npm install --ignore-scripts
34+
35+
- save_cache:
36+
key: deps1-{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }}-{{ checksum "circlejob.txt" }}
37+
paths:
38+
- "venv"
39+
- "node_modules"
40+
41+
- run:
42+
name: Build
43+
command: |
44+
. venv/bin/activate
45+
npm run clean
46+
npm run generate-components
47+
npm run build:js
48+
npm run build:py
49+
npm run generate-python-classes
50+
51+
- run:
52+
name: Run tests
53+
command: |
54+
npm run test
55+
. venv/bin/activate
56+
python --version
57+
python -m unittest tests.test_dash_html_components
58+
python -m unittest tests.test_integration
59+
python -m unittest tests.test_dash_import
60+
61+
"python-3.6":
62+
<<: *test-template
63+
docker:
64+
- image: circleci/python:3.6-stretch-node-browsers
65+
environment:
66+
PYTHON_VERSION: py36
67+
68+
"python-3.7":
69+
<<: *test-template
70+
docker:
71+
- image: circleci/python:3.7-stretch-node-browsers
72+
environment:
73+
PYTHON_VERSION: py37
74+
75+
workflows:
76+
version: 2
77+
build:
78+
jobs:
79+
- "python-2.7"
80+
- "python-3.6"

0 commit comments

Comments
 (0)