New NASA syntax #244
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |