-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.travis.yml
59 lines (52 loc) · 2.33 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
dist: trusty
# sudo: false
language: python
python:
- 3.6
branches:
only:
- master
- testing
before_install:
- sudo apt-get -qq update
# trusty does not seem to have a recent enough proj4; if using:
# - sudo apt-get install -y libproj-dev proj-bin proj-data # for cartopy
# then:
# Proj4 version 4.8.0 is installed, but cartopy requires at least version 4.9.0.
# So trying from inference from https://github.com/laszukdawid/MapViz/blob/master/.travis.yml
- sudo apt-get install -y libc6
- wget http://en.archive.ubuntu.com/ubuntu/pool/universe/p/proj/proj-data_4.9.3-2_all.deb
- sudo dpkg -i proj-data_4.9.3-2_all.deb
- wget http://en.archive.ubuntu.com/ubuntu/pool/universe/p/proj/libproj12_4.9.3-2_amd64.deb
- sudo dpkg -i libproj12_4.9.3-2_amd64.deb
- wget http://en.archive.ubuntu.com/ubuntu/pool/universe/p/proj/proj-bin_4.9.3-2_amd64.deb
- sudo dpkg -i proj-bin_4.9.3-2_amd64.deb
- wget http://en.archive.ubuntu.com/ubuntu/pool/universe/p/proj/libproj9_4.9.2-2_amd64.deb
- sudo dpkg -i libproj9_4.9.2-2_amd64.deb
- wget http://en.archive.ubuntu.com/ubuntu/pool/universe/p/proj/libproj-dev_4.9.3-2_amd64.deb
- sudo dpkg -i libproj-dev_4.9.3-2_amd64.deb
install:
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- 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
# Useful for debugging any issues with conda
- conda info -a
# Replace dep1 dep2 ... with your dependencies
- conda env create -q -f=trials/environment.yml python=$TRAVIS_PYTHON_VERSION
- source $HOME/miniconda/bin/activate ela_test
script:
# Needed the following to get codecov to collect coverage data and produce a correct .coverage file
- coverage run -m pytest
after_success:
# Not sure whether calling codecov is necessary as I installed the github app extension. Seems to work though.
- codecov
# - coveralls
# trying by inference from https://hackernoon.com/integrating-travis-ci-and-codecov-into-a-python-based-project-6f658074ff63
# - bash <(curl -s https://codecov.io/bash)