forked from pcdshub/hutch-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
72 lines (67 loc) · 2.89 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
language: python
sudo: false
env:
global:
- OFFICIAL_REPO="pcdshub/hutch-python"
- secure: "kjUAbNvwnSPFQFNf0TRX+Ea0BgVwMwRaPaL5wLRD7zvLpF5D9dzc+giUneap3LzKBxtEXIJ8hY9KgL0n63z0LwyWHKmKQT0F3ILEaqIcOOscU1G0MjCSal0DUji8EBe7xzXWr1T0AApyu39Y2iW0Qp+gTMSJEcNN9XdnBh7V0PIEA9xYP4xfpZ7vbNGvMhpDefJSIjdrAz7bVxp8JH8pxnu2WYCDS1Ik8pA7WGgNSknI0VBI2Fs43gfLocMkJSKimn2M+EGgxORdgBwoxMjRKRxIaTiLsCd+ZY5FP1DM1F1dvVusm3KNyyytaWTv9cDELQazMspv6VB1s7ouq0IgOJMySkl2BAvT6c+e8Adn+x87ZO1PyBAlJZNGO/YQdjrhRNbObu5Ld5IyvwcLw10teCMEkWJ3cNfYBL8O52vlzIlvhDcb1J+pONecc+a6Fr9Ag6nUz6krPr5zF5bK/3qxlC5PmzhnjSeTXqizaub+RVXHNyj7xKNJDczOmqM4HvkXe+kyBiauCnWXu86bOlKY3j8upSrGQCOKcHbFWMExZIsIBq3+g2nLI0bpEC2xT9iTgeLtzB24kkF3bHQ6BaTjU135lrRlVhC7CFiFPuqDUpVzLNWikG9rjPcJAsmQzYauUedm40MNtbqVOA5+2VGePuVMxLIXfHVn43taL916Vh8="
matrix:
include:
- python: 3.6
env:
- PCDS_CHANNEL=pcds-tag
- python: 3.6
env:
- PCDS_CHANNEL=pcds-dev
- BUILD_DOCS=1
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 --add channels $PCDS_CHANNEL
- conda config --append channels conda-forge
# Useful for debugging any issues with conda
- conda info -a
# Test conda build
- conda build -q conda-recipe --output-folder bld-dir
- conda config --add channels "file://`pwd`/bld-dir"
# Create test environment
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION hutch-python --file dev-requirements.txt
- source activate test-environment
script:
# Test with the checkout
- coverage run run_tests.py
- coverage report -m
- flake8 hutch_python
- flake8 bin
# Test again, with the installed version
- mkdir notest
- mv hutch_python/*.* notest
- python run_tests.py
- mv notest/* hutch_python
- rmdir notest
# Build docs
- set -e
- |
if [[ -n "$DOCTR_DEPLOY_ENCRYPTION_KEY_PCDSHUB_HUTCH_PYTHON" && $BUILD_DOCS ]]; then
pushd docs
make html
popd
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 != '' && $PCDS_CHANNEL == 'pcds-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 == '' && $PCDS_CHANNEL == 'pcds-dev' ]]; then
export ANACONDA_API_TOKEN=$CONDA_UPLOAD_TOKEN_DEV
anaconda upload bld-dir/linux-64/*.tar.bz2
fi