forked from plotly/plotly.py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
70 lines (51 loc) · 2.23 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
machine:
environment:
PLOTLY_CONFIG_DIR: ${HOME}/.plotly
TOX_TESTENV_PASSENV: PLOTLY_TOX_*
PLOTLY_TOX_PYTHON_27: /home/ubuntu/.pyenv/versions/2.7.10/bin/python2.7
PLOTLY_TOX_PYTHON_33: /home/ubuntu/.pyenv/versions/3.3.3/bin/python3.3
PLOTLY_TOX_PYTHON_34: /home/ubuntu/.pyenv/versions/3.4.3/bin/python3.4
PLOTLY_TOX_PYTHON_35: /home/ubuntu/.pyenv/versions/3.5.0/bin/python3.5
PLOTLY_JUPYTER_TEST_DIR: /home/ubuntu/${CIRCLE_PROJECT_REPONAME}/plotly/tests/test_optional/test_jupyter
node:
# use a pre-installed version of node so we don't need to download it.
version: 6.0.0
dependencies:
override:
# install everything tox knows about and the plotly package.
- pip install tox
- tox --notest
- pip install -I .
# we need to cd out of the project root to ensure the install worked
- cd ~ && python -c "import plotly"
# install jupyter test JS requirements
- cd ${PLOTLY_JUPYTER_TEST_DIR} && npm i
cache_directories:
# cache everything that tox installs for us.
- .tox
- ${PLOTLY_JUPYTER_TEST_DIR}/node_modules
test:
override:
# let tox do its thing. matplotlib is broken at the moment.
- tox -- -a '!matplotlib'
# we setup tox to create coverage reports, move them to artifacts.
- mv ~/${CIRCLE_PROJECT_REPONAME}/.tox/coverage-reports ${CIRCLE_ARTIFACTS}
# import it once normally (ensures .plotly exists)
- python -c "import plotly"
# test that it imports when you don't have write permissions
- sudo chmod -R 444 ${PLOTLY_CONFIG_DIR} && python -c "import plotly"
# test that giving back write permissions works again
- sudo chmod -R 777 ${PLOTLY_CONFIG_DIR} && python -c "import plotly"
# test that figure_factory cannot be imported with only core requirements.
# since optional requirements is part of the test suite, we don't need to
# worry about testing that it *can* be imported in this case.
- $(! python -c "import plotly.figure_factory")
# test the distribution and a basic import
- rm -rf dist/ &&
python setup.py sdist &&
mkdir test_install &&
cd test_install &&
virtualenv venv &&
source venv/bin/activate &&
pip install ../dist/* &&
python -c "import plotly"