Skip to content

Switch to using xr.open_dataset to read nwp data #29

Switch to using xr.open_dataset to read nwp data

Switch to using xr.open_dataset to read nwp data #29

name: Test pysteps-nwp-importers
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
unit_tests:
name: Unit Tests (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest", "macos-latest", "windows-latest" ]
python-version: ["3.9", "3.11"]
max-parallel: 6
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install mamba and create environment
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: ci/ci_test_env.yml
environment-name: test_environment
extra-specs: python=${{ matrix.python-version }}
- name: Pre-install pysteps (MacOS only)
if: matrix.os == 'macos-latest'
working-directory: ${{github.workspace}}
env:
CC: gcc-13
CXX: g++-13
CXX1X: g++-13
HOMEBREW_NO_INSTALL_CLEANUP: 1
run: |
brew update-reset
brew update
gcc-13 --version || brew install gcc@13
pip install "pysteps>=1.4,<2.0"
- name: Install pysteps-nwp-importers
working-directory: ${{github.workspace}}
run: pip install .
- name: Check imports
run: |
python --version
python -c "import pysteps_nwp_importers"
- name: Run tests
run: pytest --pyargs pysteps_nwp_importers