-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
53 lines (48 loc) · 1.7 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
language: python
python:
- "3.6"
# command to install dependencies
install:
- sudo apt-get update
- 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 update -q conda
- conda install conda-build
# Useful for debugging any issues with conda
- conda info -a
# conda channels
- conda config --append channels conda-forge
- conda config --append channels cmutel
- conda config --append channels haasad
- conda config --append channels pjamesjoyce
# conda build
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
echo $(date '+%Y%m%d%H%M');
sed "s/ number:\ 0/ number:\ $(date '+%Y%m%d%H%M')/g" ./ci/travis/recipe/meta.yaml > /tmp/meta.yaml;
mv /tmp/meta.yaml ./ci/travis/recipe/meta.yaml;
fi
- conda build ./ci/travis/recipe
# Create environment
- conda create -q -n test python=$TRAVIS_PYTHON_VERSION
- source activate test
- conda install -q --use-local lca_disclosures
- pip install -r travis-requirements.txt
# command to run tests
script: cd tests; pytest --cov=lca_disclosures
after_success:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
coveralls;
if [ "$TRAVIS_BRANCH" = "development" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then
conda install anaconda-client;
cp /home/travis/miniconda/conda-bld/noarch/*.tar.bz2 .;
anaconda -t $CONDA_TOKEN upload --force *.tar.bz2;
echo "uploaded to conda channel";
else
echo "no upload because not development branch";
fi
else
echo "no upload from osx";
fi