Draft workflow to run on GitHub Actions #4
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: 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 }} | |
- name: Create environment | |
run: | |
conda env create -f environment.yml | |
- name: List installed packages | |
run: conda list | |
- name: Run notebook | |
run: | |
jupyter execute --inplace notebooks/03-gravity/*.ipynb |