Skip to content

Nightly Notebook Execution #690

Nightly Notebook Execution

Nightly Notebook Execution #690

Workflow file for this run

name: Nightly Notebook Execution
on:
schedule:
- cron: '0 3 * * *' # run at 2 AM UTC
env:
ARCH_ON_CI: "normal"
IS_CRON: "true"
WEBBPSF_PATH: $HOME/data/webbpsf-data
PYSYN_CDBS: $PWD/grp/redcat/trds/
jobs:
gather-notebooks:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- id: set-matrix
run: echo "::set-output name=matrix::$(find notebooks -name "*.ipynb" | jq -cnR '[inputs | select(length>0)]')"
nightly-notebook-execution:
needs: gather-notebooks
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
notebooks: ${{ fromJson(needs.gather-notebooks.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
#- run: |
# pip install -r ${${{ matrix.notebooks }}%/*}/requirements.txt
- uses: actions/checkout@v4
- name: Set up Python 3.8.12
uses: actions/setup-python@v5 ## needed for caching
with:
python-version: 3.8.12
cache: 'pip'
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
#conda env update --file CIenvironment.yml --name base
pip install -r requirements.txt
pip install pytest
pip install nbval
pip install nbconvert
- name: Execute notebooks
run: |
jupyter nbconvert --template classic --to html --execute "${{ matrix.notebooks }}"
#- name: Validate notebooks
# run: |
# pytest --nbval "${{ matrix.notebooks }}"