-
Notifications
You must be signed in to change notification settings - Fork 3
69 lines (58 loc) · 1.84 KB
/
ci.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
60
61
62
63
64
65
66
67
68
69
name: OceanColor
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: "7 18 * * 0"
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- name: Install System requirements
run: |
sudo apt-get update
sudo apt-get install -y libhdf5-dev libnetcdf-dev
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -e .[dev,parallel,s3]
- name: Cache sample data
id: cache-samples
uses: actions/cache@v3
with:
path: |
MODIS-Aqua/L3m/2017/012/A2017012.L3m_DAY_CHL_chlor_a_4km.nc
MODIS-Aqua/L2/2016/244/A2016244221000.L2_LAC_OC.nc
MODIS-Aqua/L2/2016/245/A2016245211500.L2_LAC_OC.nc
MODIS-Aqua/L2/2017/012/A2017012213500.L2_LAC_OC.nc
MODIS-Terra/L3m/2004/006/T2004006.L3m_DAY_CHL_chlor_a_4km.nc
VIIRS-SNPP/L2/2017/013/V2017013002400.L2_SNPP_OC.nc
key: ${{ runner.os }}-CHL
- name: Test with pytest
run: |
pytest -v tests
env:
NASA_USERNAME: ${{ secrets.NASA_USERNAME }}
NASA_PASSWORD: ${{ secrets.NASA_PASSWORD }}