forked from ECCO-GROUP/ECCOv4-py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
56 lines (49 loc) · 1.73 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
# Based on xgcm's .travis.yml and
# https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/use-conda-with-travis-ci.html
language: python
sudo: false # use container based build
notifications:
email: false
matrix:
fast_finish: true
include:
- python: 3.7
env: CONDA_ENV=py37
- python: 3.8
env: CONDA_ENV=py38
- python: 3.9
env: CONDA_ENV=py39
before_install:
- wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
# - source "$HOME/miniconda/etc/profile.d/conda.sh"
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
- conda list
install:
- conda env create --file ci/environment-$CONDA_ENV.yml
- source activate test_env_ecco
- python -c "import xarray; print(xarray.__version__)"
# from current xgcm ci.yaml https://github.com/xgcm/xgcm/blob/675d680a7dc75a71186aa5516bd60b40650ff7f5/.github/workflows/ci.yaml
- python -m pip install -e . --no-deps
- conda list
# note from xgcm version:
# if we do this, the package gets installed into
# /home/travis/build/xgcm/xgcm/build/lib/xgcm
# - python setup.py install
# test remove this line for travis 2022-05-01
# - pip install -e .
#
# this puts the package into
# /home/travis/build/xgcm/xgcm/xgcm
# That turns out to be necessary for py.test to correctly collect the tests
# and for coverage to work properly.
# It is very complicated and confusing.
# ^^ wow I'm glad I didn't have to figure that out.
script:
- py.test ecco_v4_py -v --cov=ecco_v4_py --cov-config .coveragerc --ignore=ecco_v4_py/test/test_generate_ecco_netcdf_product.py
after_success:
- codecov