Skip to content

Cookiecutter update, GIS testing adjustments #19

Cookiecutter update, GIS testing adjustments

Cookiecutter update, GIS testing adjustments #19

Workflow file for this run

name: Notebooks
on:
push:
branches:
- main
pull_request:
schedule:
- cron: '0 9 * * 1'
env:
RAVEN_TESTDATA_BRANCH: v2025.6.12
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
permissions:
contents: read
jobs:
notebooks:
name: Test Notebooks (Anaconda, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest", "macos-latest" ]
python-version: [ "3.13" ] # pymetalink not yet supported in Python 3.14
defaults:
run:
shell: bash -l {0}
steps:
- name: Harden Runner
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
disable-sudo: true
egress-policy: audit
- name: Checkout Repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Conda (Micromamba) with Python${{ matrix.python-version }}
uses: mamba-org/setup-micromamba@add3a49764cedee8ee24e82dfde87f5bc2914462 # v2.0.7
with:
cache-downloads: true
cache-environment: true
cache-environment-key: environment-${{ matrix.python-version }}-${{ matrix.os }}-${{ github.head_ref }}
environment-file: environment-dev.yml
create-args: >-
python=${{ matrix.python-version }}
- name: Install RavenPy
run: |
python -m pip install --no-deps --editable .
- name: List installed packages
run: |
micromamba list
python -m pip check || true
- name: Cache test data (macOS)
if: matrix.os == 'macos-latest'
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: |
~/Library/Caches/raven-testdata
key: ${{ hashFiles('src/ravenpy/testing/registry.txt') }}-${{ env.RAVEN_TESTDATA_BRANCH }}-conda-${{ matrix.os }}
- name: Cache test data (Ubuntu)
if: matrix.os == 'ubuntu-latest'
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: |
~/.cache/raven-testdata
key: ${{ hashFiles('src/ravenpy/testing/registry.txt') }}-${{ env.RAVEN_TESTDATA_BRANCH }}-conda-${{ matrix.os }}
- name: Prefetch RavenPy testing data
run: |
python -c "import ravenpy.testing.utils as rtu; rtu.populate_testing_data()"
- name: Test RavenPy
run: |
make test-notebooks