Skip to content

CoTeDe

CoTeDe #126

Workflow file for this run

name: CoTeDe
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: "17 18 * * 0"
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 2
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install
run: |
python -m pip install --upgrade pip
pip install -e .[test]
- name: Cache ETOPO
id: cache-etopo
uses: actions/cache@v2
with:
path: |
~/.config/oceansdb/etopo5.nc
key: ${{ runner.os }}-ETOPO
- name: Download ETOPO database
if: steps.cache-etopo.outputs.cache-hit != 'true'
run: python -c "import oceansdb; oceansdb.ETOPO()['topography']"
- name: Cache WOA
id: cache-woa
uses: actions/cache@v2
with:
path: |
~/.config/oceansdb/woa18_decav_t13_5d.nc
~/.config/oceansdb/woa18_decav_t14_5d.nc
~/.config/oceansdb/woa18_decav_t15_5d.nc
~/.config/oceansdb/woa18_decav_t16_5d.nc
~/.config/oceansdb/woa18_decav_s13_5d.nc
~/.config/oceansdb/woa18_decav_s14_5d.nc
~/.config/oceansdb/woa18_decav_s15_5d.nc
~/.config/oceansdb/woa18_decav_s16_5d.nc
key: ${{ runner.os }}-WOA
- name: Download WOA database
if: steps.cache-woa.outputs.cache-hit != 'true'
run: |
python -c "import oceansdb; oceansdb.WOA()['sea_water_temperature']"
python -c "import oceansdb; oceansdb.WOA()['sea_water_salinity']"
- name: Cache CARS
id: cache-cars
uses: actions/cache@v2
with:
path: |
~/.config/oceansdb/temperature_cars2009a.nc
~/.config/oceansdb/salinity_cars2009a.nc
key: ${{ runner.os }}-CARS
- name: Download CARS database
if: steps.cache-cars.outputs.cache-hit != 'true'
run: |
python -c "import oceansdb; oceansdb.CARS()['sea_water_temperature']"
python -c "import oceansdb; oceansdb.CARS()['sea_water_salinity']"
- name: Cache sample data
id: cache-samples
uses: actions/cache@v2
with:
path: |
~/.config/sampledata/dPIRX010.npz
~/.config/sampledata/NOS_8764227.npz
key: ${{ runner.os }}-dPIRX010
- name: Download sample data
if: steps.cache-samples.outputs.cache-hit != 'true'
run: |
python -c "from cotede import datasets; datasets.load_ctd()"
python -c "from cotede import datasets; datasets.load_water_level()"
- name: Test with pytest
run: |
pytest tests