Skip to content

Notebook Tests

Notebook Tests #5

name: Build & Test Notebooks
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build-notebooks:
runs-on: ubuntu-latest
steps:
- name: Checkout stingray repo
uses: actions/checkout@v4
with:
repository: StingraySoftware/stingray
path: ./stingray
submodules: true
- name: Checkout PR version of notebooks
if: github.event_name == 'pull_request'
run: |
cd ./stingray/notebooks # Change to the submodule directory
git fetch origin pull/${{ github.event.pull_request.number }}/head:PR_${{ github.event.pull_request.number }}
git checkout PR_${{ github.event.pull_request.number }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install pandoc and dependencies
run: |
sudo apt-get update
sudo apt-get install -y pandoc fonts-freefont-ttf
pip install sphinx sphinx-astropy tox
- name: Install Stingray
run: pip install -e ./stingray
- name: Run Build Docs
run: |
cd ./stingray
tox -e build_docs