-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
68 lines (61 loc) · 2.45 KB
/
.travis.yml
File metadata and controls
68 lines (61 loc) · 2.45 KB
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
# whitelist
branches:
only:
- master
- develop
language: python
python:
- "2.7"
# Use the new travis docker based infrastructure
sudo: false
# Install required packages
addons:
postgresql: "9.3"
apt:
packages:
# libhdf4-alt-dev is not available on travis CI. It would appear this package is not required by tests at this time
# TODO: Check if this dependency is truly required
# - libhdf4-alt-dev
- libhdf5-serial-dev
- libnetcdf-dev
# libgdal-dev has a packaging conflict on travis ci which causes it to uninstall postgis.
# TODO: Check if this dependency is truly required
# - libgdal-dev
# Command to install miniconda to build test environment
before_install:
# Python and packages
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget http://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
# Add Jess Robertson (CSIRO) binstar channel to get custom builds for some utilities
- conda config --add channels jesserobertson
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
# Test databases and data
- wget https://github.com/data-cube/agdc-v2-data/raw/master/sample_dbs/gdf_modis_20150710.backup
- wget https://github.com/data-cube/agdc-v2-data/raw/master/sample_dbs/gdf_landsat_20150710.backup
# TODO: Add download of test data when available in a suitable size
- cd gdf_database
# Travis logs will show a WARNING regarding the "gdf_modis" does not exist, and Error regarding SCHEMA topology
# These are to be expected and can be safely ignored. It is a consequence of restoring a backup after creating an empty
# database that ensures the database setup scripts are working
- ./gdf_db_setup.sh
- ./create_db_from_backup.sh gdf_test_modis ../gdf_modis_20150710.backup
- ./create_db_from_backup.sh gdf_test_ls ../gdf_landsat_20150710.backup
- cd ..
install:
- conda create -q -n test-agdc python=$TRAVIS_PYTHON_VERSION nose pip sphinx numpy scipy matplotlib gdal netCDF4 numexpr psycopg2 coverage python-coveralls
- source activate test-agdc
- python setup.py install
# Command to run tests
script:
- coverage run -m unittest discover gdf_tests
after_success:
- coveralls