-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
46 lines (40 loc) · 1.35 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
# Do not use Travis Python to save some time.
language: generic
cache:
directories:
- $HOME/download
- $HOME/miniconda
before_cache:
- if ! [[ $TRAVIS_TAG ]]; then rm -rf $HOME/miniconda/conda-bld; fi
- rm -rf $HOME/miniconda/locks $HOME/miniconda/pkgs $HOME/miniconda/var $HOME/miniconda/conda-meta/history
before_install:
# Caches the conda installation and env across builds.
- if test -e $HOME/miniconda/bin; then
echo "miniconda already installed.";
else
echo "Installing miniconda.";
rm -rf $HOME/miniconda;
mkdir -p $HOME/download;
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O $HOME/download/miniconda.sh;
bash $HOME/download/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 config --add channels conda-forge;
conda info -a;
conda env create -f env.yml;
fi
install:
- export PATH="$HOME/miniconda/bin:$PATH"
# Useful for debugging any issues with conda.
- conda info -a
- source activate epysurv-dev
- pip install -r requirements-dev.txt
script:
- black --check epysurv/ tests/
- mypy --package epysurv
- flake8 epysurv
- PYTHONPATH=. pytest --cov=epysurv tests/
after_success:
- codecov