Notebook to access, download and plot GeoTIFFs using MEaSUREs data sets as examples #113
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: Test Notebooks | |
on: | |
pull_request: | |
paths: | |
- notebooks/** | |
- binder/** | |
- '.github/workflows/' | |
types: [opened, synchronize] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
linux: | |
name: Linux tests | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "Install Conda environment with Micromamba" | |
uses: mamba-org/provision-with-micromamba@main | |
with: | |
cache-env: true | |
environment-file: binder/environment.yml | |
environment-name: nsidc-tutorials | |
- name: "Verify micromamba" | |
shell: bash -l {0} | |
run: | | |
micromamba info | |
jupyter kernelspec list | |
which python | |
printenv | sort | |
- name: "Verify that libraries used in notebooks are present in the environment" | |
shell: bash -l {0} | |
run: | | |
conda list | sort | |
printenv | sort | |
find notebooks -type f -iname \*.ipynb -not -path '*\.ipynb_checkpoints/*' -not -path '*/iceflow/*' | xargs -I % python .github/workflows/scan_notebooks.py -n % | |
- name: "Setup Quarto" | |
uses: quarto-dev/quarto-actions/setup@v2 | |
with: | |
version: 1.1.251 | |
- name: install-aws-cli | |
uses: unfor19/install-aws-cli-action@v1 | |
with: | |
version: 2 # default | |
verbose: false # default | |
arch: amd64 # allowed values: amd64, arm64 | |
- name: "Execute notebooks with Quarto" | |
env: | |
EARTHDATA_USERNAME: ${{ secrets.EARTHDATA_USERNAME }} | |
EARTHDATA_PASSWORD: ${{ secrets.EARTHDATA_PASSWORD }} | |
shell: bash -l {0} | |
run: | | |
jupyter kernelspec list | |
find notebooks -type f -name "*.ipynb" | xargs -I F quarto render "F" --execute --execute-daemon | |
win-osx: | |
name: Runtime (${{ matrix.os }}, micromamba) | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["windows", "macos"] | |
include: | |
- os: windows | |
environment-file: binder/conda-win-64.lock | |
- os: macos | |
environment-file: binder/conda-osx-64.lock | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "Install Conda environment with Micromamba" | |
uses: mamba-org/provision-with-micromamba@main | |
with: | |
cache-env: true | |
environment-file: ${{ matrix.environment-file }} | |
environment-name: nsidc-tutorials | |
- name: "Verify micromamba" | |
shell: bash -l {0} | |
run: | | |
micromamba info | |
jupyter kernelspec list | |
which python | |
printenv | sort | |