forked from paulgb/runipy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
74 lines (74 loc) · 2.78 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
language: cpp
env:
- PYTHON_VERSION="3.5"
- PYTHON_VERSION="3.4"
- PYTHON_VERSION="2.7"
- PYTHON_VERSION="3.5" IPYTHON_VERSION=4
- PYTHON_VERSION="3.4" IPYTHON_VERSION=4
- PYTHON_VERSION="2.7" IPYTHON_VERSION=4
- PYTHON_VERSION="3.4" IPYTHON_VERSION=3
- PYTHON_VERSION="3.3" IPYTHON_VERSION=3
- PYTHON_VERSION="2.7" IPYTHON_VERSION=3
- PYTHON_VERSION="3.3" IPYTHON_VERSION=2
- PYTHON_VERSION="2.7" IPYTHON_VERSION=2
before_install:
# Move out of git directory to build root.
- cd ../..
- pwd
install:
# Download and configure conda.
- wget http://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"
- conda config --set always_yes yes
- conda config --set show_channel_urls True
- source activate root
- conda update --all
# Build the conda package for runipy.
- cd $TRAVIS_REPO_SLUG
- VERSION=`python setup.py --version`
- echo $VERSION
# Create the test environment and install dependencies.
- conda create -n testenv python=$PYTHON_VERSION
- source activate testenv
# Install dependencies.
- touch $HOME/miniconda/envs/testenv/conda-meta/pinned
- echo "python ${PYTHON_VERSION}.*" >> $HOME/miniconda/envs/testenv/conda-meta/pinned
- if [ -v IPYTHON_VERSION ]; then echo "ipython ${IPYTHON_VERSION}.*" >> $HOME/miniconda/envs/testenv/conda-meta/pinned ; fi
- if [ -v IPYTHON_VERSION ]; then echo "ipython-notebook ${IPYTHON_VERSION}.*" >> $HOME/miniconda/envs/testenv/conda-meta/pinned ; fi
- if [ -v IPYTHON_VERSION ]; then conda install ipython-notebook ; fi
# Install coverage and coveralls to generate and submit test coverage results for coveralls.io.
- echo "coverage 3.*" >> $HOME/miniconda/envs/testenv/conda-meta/pinned
- conda install coverage
- pip install coveralls
# Install runipy.
- coverage run -a -m pip install .
# Install linting tools.
- if [ "${PYTHON_VERSION}" != "3.5" ]; then pip install prospector[with_everything] ; fi
# Clean up downloads as there are quite a few and they waste space/memory.
- conda clean -tipsy
- rm -rfv $HOME/.cache/pip
script:
# Run CLI.
- coverage run -a runipy/main.py --version
- coverage run -a runipy/main.py --help
- coverage run -a runipy/main.py
# Run tests.
- coverage run -a setup.py test --verbose
- coverage report
# Analyze code.
- if [ "${PYTHON_VERSION}" != "3.5" ]; then prospector || true ; fi
# Use container format for TravisCI.
after_success:
# Submit results to coveralls.io.
- coveralls
sudo: false
notifications:
email:
on_success: never
on_failure: never
webhooks:
on_success: always
on_failure: always
urls:
- https://webhooks.gitter.im/e/ddb94a08ad824369f3bf