Skip to content

Add github workflow for checking notebooks #7

Add github workflow for checking notebooks

Add github workflow for checking notebooks #7

name: Execute R notebooks
on:
pull_request:
workflow_dispatch:
# run once a week
schedule:
- cron: "0 0 * * 0"
jobs:
build:
runs-on: ubuntu-latest
steps:
- id: checkout
uses: actions/checkout@v3
- id: python-setup
name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- id: install-juptyer
name: Install Juptyer
run: |
python -m pip install --upgrade pip
pip install jupyter
- id: r-setup
name: Set up R
uses: r-lib/actions/setup-r@v2
#- id: r-dependencies
# name: Install R dependencies
# uses: r-lib/actions/setup-renv@v2
- id: r-dependencies
name: Install r dependencies
run: |
R -e 'install.packages("renv")'
R -e 'renv::restore()'
R -e 'install.packages("IRkernel")'
R -e 'IRkernel::installspec()'
- id: execute-bioscales
name: Execute bioscales notebook
run: |
jupyter nbconvert --execute --to notebook --inplace bioscales_biogeochemical_metadata/R/bioscales_metadata.ipynb