forked from pcdshub/pcdsdevices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
70 lines (65 loc) · 2.84 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
language: python
sudo: false
env:
global:
- OFFICIAL_REPO="pcdshub/pcdsdevices"
- secure: "r193Awf/D5CEelI4xRDPsgcJQbbrgrhZNLUtPaHeK1H17yZIRkCPjDUfU7JZuA72JRbFNVaDSIVCJiTfKMbD4QwclVaHsBunWyJ+S6L9BrKzL7Fo2RvUsJ675gpSnY071ibVmY7Q4iI5vt1Hn3WKracgH6VaMZzWC7GbPJd0E/hYygR1zXXzGtowOv1W4n9U1Tj2AuL6qdF6/l4qgVfaMe0Lr6JvdmFdqv8bWD4Cm3y78yi3cadHy5YAf2IkHqAEghgvrf3qJYFx4ZJcKMTjMqvyPSqWQ2J9xntoj4aHKWFvg/uLHU7GLttAOtoabjf/2mYnjnMpN8WI2h2Nsi4Q16ELKlKUY5zdz7/v4JvO9lKn2dP3LtOoI/j0gqMtZqXQ85tVndvvln40x7QwXo14T5sZU5y0IwI8OZXBVEk+cimbVQggtsm7MJoIWwopjdmbq0R5n39+Q6Xfgt5GJJf8EDvAI0uYK7PNIgDTEEqxMChj+R8/ArEyfcDPrgODVAuLpwvkFft3wKFAH8O3Ms2Dc5jeunqYmf2kEYkyr/pSuukVLKVe0HIi75CfMEguuCPHoCN+p/nESRrach2ItCHBqHIjggCYPzmAYueIF11ecbkok8k2sweC6DKDm9yP/wfq01fHpvhTTsBMMexXVqLpj1HYybonxGGw448EHTZKT2k="
matrix:
include:
- python: 3.6
env: BUILD_DOCS=1
- python: 3.7
dist: xenial
sudo: true
allow_failures:
- python: 3.7
dist: xenial
sudo: true
install:
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda install conda-build anaconda-client
- conda update -q conda conda-build
- conda config --add channels pcds-tag
- conda config --append channels conda-forge
# Useful for debugging any issues with conda
- conda info -a
# Test conda build
- conda build -q conda-recipe --python $TRAVIS_PYTHON_VERSION --output-folder bld-dir
- conda config --add channels "file://`pwd`/bld-dir"
#Grab all dependencies
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION pcdsdevices --file dev-requirements.txt
#Launch Conda environment
- source activate test-environment
script:
- coverage run run_tests.py
- coverage report -m
- flake8 pcdsdevices/*.py
- flake8 tests/*.py
- set -e
#Build docs
- |
if [[ -n "$DOCTR_DEPLOY_ENCRYPTION_KEY_PCDSHUB_PCDSDEVICES" && $BUILD_DOCS ]]; then
conda install --file docs-requirements.txt
pip install m2r
pushd docs
make html
popd
#Publish docs.
doctr deploy . --built-docs docs/build/html --deploy-branch-name gh-pages
fi
after_success:
- codecov
- |
if [[ $TRAVIS_PULL_REQUEST == false && $TRAVIS_REPO_SLUG == $OFFICIAL_REPO && $TRAVIS_BRANCH == $TRAVIS_TAG && $TRAVIS_TAG != '' && $CONDA_UPLOAD_TOKEN_TAG != '' ]]; then
export ANACONDA_API_TOKEN=$CONDA_UPLOAD_TOKEN_TAG
anaconda upload bld-dir/linux-64/*.tar.bz2
fi
- |
if [[ $TRAVIS_PULL_REQUEST == false && $TRAVIS_REPO_SLUG == $OFFICIAL_REPO && $TRAVIS_BRANCH == 'master' && $TRAVIS_TAG == '' && $CONDA_UPLOAD_TOKEN_DEV != '' ]]; then
export ANACONDA_API_TOKEN=$CONDA_UPLOAD_TOKEN_DEV
anaconda upload bld-dir/linux-64/*.tar.bz2
fi