Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft workflow to run on GitHub Actions #15

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
45 changes: 45 additions & 0 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Rerun the notebooks

on:
pull_request:
push:
branches:
- main
# Run this action manually (this file needs to be in the default branch)
workflow_dispatch:

jobs:
run-notebooks:
runs-on: ubuntu-latest
env:
PYTHON: "3.10"

# Use bash by default in all jobs
defaults:
run:
shell: bash -el {0}

steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ env.PYTHON }}
activate-environment: simpeg-user-tutorial
environment-file: environment.yml
auto-activate-base: false

- name: List installed packages
run: |
conda info
conda list

- name: Run notebook
run: |
for notebook in notebooks/**/*.ipynb; do
echo "Running '$notebook'"
jupyter execute --inplace $notebook
done
13 changes: 13 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: simpeg-user-tutorials
channels:
- conda-forge
dependencies:
- python=3.10.*
# Myst requirements
- nodejs>=20,<21
- mystmd
# Notebook requirements
- jupyter
- SimPEG==0.20.*
- discretize==0.10.*
- pymatsolver
Loading