forked from icesat2py/icepyx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
44 lines (40 loc) · 1.95 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
language: python
before_install:
- sudo apt-get update
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- 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
install:
- conda create --name icepyx-env --channel conda-forge python=3.10 proj geos
- source activate icepyx-env
- pip install -r requirements.txt -r requirements-dev.txt
- pip install -e .[complete]
stages:
- name: basic tests
if: (type = pull_request) OR (type = push AND repo = icesat2py/icepyx AND branch IN (main, development))
- name: behind Earthdata
if: branch = main OR commit_message =~ nsidc_tests OR type = cron
#ultimately move basic tests list into a separate script with the list of files to run (then this can be put into a matrix and parallellized as well)
jobs:
include:
- stage: basic tests
script: pytest icepyx/ --verbose --cov app --ignore=icepyx/tests/test_behind_NSIDC_API_login.py --ignore=icepyx/tests/test_auth.py
# includes an integrity check of the uploader as recommended by CodeCov
after_success:
- curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import # One-time step
- curl -Os https://uploader.codecov.io/latest/linux/codecov
- curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
- curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
- gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
- shasum -a 256 -c codecov.SHA256SUM
- chmod +x codecov
- ./codecov -t ${CODECOV_TOKEN}
- stage: behind Earthdata
script:
- export EARTHDATA_PASSWORD=$NSIDC_LOGIN
- pytest icepyx/tests/test_behind_NSIDC_API_login.py icepyx/tests/test_auth.py