forked from xpdAcq/xpdAn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
81 lines (73 loc) · 3.04 KB
/
.travis.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
71
72
73
74
75
76
77
78
79
80
81
language: python
sudo: false
env:
global:
BUILD_DOCS_BRANCH: master
DOCS_SUBDIR: doc/
TARGET_DEV_SUBDIR: bluesky/
HTML_SUBDIR: build/html
DOCS_CONDA_DEPS: "bluesky"
DOCS_PIP_DEPS: "tqdm"
cache:
directories:
- $HOME/.cache/pip
- $HOME/.cache/matplotlib
services:
- mongodb
addons:
apt:
sources:
- mongodb-3.2-precise
packages:
- mongodb-org-server
python:
- 3.5
before_install:
- git clone https://github.com/NSLS-II/nsls2-ci --branch master --single-branch ~/ci_scripts
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16"
- "export DISPLAY=:99.0"
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b -p ~/mc
- export PATH=~/mc/bin:$PATH
- conda update conda --yes
- export CONDARC=ci/condarc
- export MDS_HOST=localhost
- export MDS_DATABASE=test
- export MDS_TIMEZONE=US/Eastern
- mkdir -p /home/travis/.config/metadatastore
- 'echo ''port: 27017'' > /home/travis/.config/metadatastore/connection.yml'
- export FS_HOST=localhost
- export FS_DATABASE=test
- mkdir -p /home/travis/.config/filestore
- 'echo ''port: 27017'' > /home/travis/.config/filestore/connection.yml'
install:
- export GIT_FULL_HASH=`git rev-parse HEAD`
- conda create --yes -n testenv numpy scipy flake8 matplotlib python=$TRAVIS_PYTHON_VERSION pytest coverage pip databroker ophyd historydict boltons doct pyepics super_state_machine mock xlrd scikit-beam bluesky pyFAI pyxdameraulevenshtein -c lightsource2 -c conda-forge -c soft-matter
- source activate testenv
# - 'pip install https://github.com/NSLS-II/event-model/zipball/master#egg=event_model'
# - conda remove metadatastore databroker filestore --yes
# - 'pip install https://github.com/NSLS-II/databroker/zipball/master#egg=databroker'
# - 'pip install https://github.com/NSLS-II/filestore/zipball/master#egg=filestore'
# - 'pip install https://github.com/NSLS-II/metadatastore/zipball/master#egg=metadatastore'
# - 'pip install https://github.com/NSLS-II/portable-mds/zipball/master#egg=portable_mds'
# - 'pip install https://github.com/NSLS-II/portable-fs/zipball/master#egg=portable_fs'
# - 'pip install https://github.com/NSLS-II/bluesky/zipball/master#egg=bluesky'
- python setup.py install
- cp xpdan/config/xpdan.yml /home/travis/.config/xpdan.yml
# Need to clean the python build directory (and other cruft) or pytest is
# going to find the build directory and get confused why there are two sets
# of every test file
- python -c "from filestore import utils, conf; utils.install_sentinels(conf.connection_config, 1)"
# make sure the sqlite file exists to avoid race conditions
- python -c "from bluesky.utils import get_history; get_history()"
- pip install codecov pytest-env python-coveralls
- git clean -xfd
script:
- coverage run run_tests.py
- coverage report -m
after_script:
- flake8 .
after_success:
- codecov
- coveralls