Skip to content

Commit b6a8059

Browse files
committed
add travis CI config files
1 parent 0e0f8de commit b6a8059

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

.travis.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
language: python
2+
3+
python:
4+
# We don't actually use the Travis Python, but this keeps it organized.
5+
# - "2.7"
6+
# - "3.5"
7+
- "3.7"
8+
9+
services:
10+
- postgresql
11+
12+
install:
13+
- sudo apt-get update
14+
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
15+
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
16+
else
17+
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
18+
fi
19+
- bash miniconda.sh -b -p $HOME/miniconda
20+
- export PATH="$HOME/miniconda/bin:$PATH"
21+
- hash -r
22+
- conda config --set always_yes yes --set changeps1 no
23+
- conda update -q conda
24+
# Useful for debugging any issues with conda
25+
- conda info -a
26+
27+
- conda env create --file environment.yml
28+
- source activate obsarray
29+
30+
script:
31+
# For the unit-tests, disable Numba JIT, otherwise Coverage wont reach the actual Python code
32+
- python setup.py install
33+
- python -m unittest discover -p "test_*.py"
34+
- coverage run -m unittest discover -p "test_*.py"
35+
36+
after_success:
37+
- pip install codecov
38+
- codecov

environment.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: obsarray
2+
channels:
3+
- conda-forge
4+
- defaults
5+
- coecms
6+
dependencies:
7+
- python=3.9*
8+
#
9+
# dependencies (in alphabetical order)
10+
#
11+
- numpy
12+
- pip
13+
- xarray
14+
- pip:
15+
- comet_maths
16+
#
17+
# for testing only
18+
#
19+
- pytest >=5.4.1
20+
- pytest-cov >=2.8.1

0 commit comments

Comments
 (0)