Currently, we do not have a dedicated CI step to verify that tutorials run correctly in Google Colab. Since Colab support is important for workshops and new users, we should explore adding an automated test step (possibly using the official Colab Docker image) to ensure tutorials execute successfully in a Colab-like environment.
Note that setting up and maintaining the local runner environment will be necessary.
Based on:
https://github.com/orgs/easyscience/discussions/24#discussioncomment-12488172
Here is a draft implementation of tutorial-tests-colab.yml:
name: Tutorial tests (Colab)
on:
workflow_dispatch:
concurrency:
group:
${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
tutorial-tests-colab:
runs-on: ubuntu-latest
container:
image: europe-docker.pkg.dev/colab-images/public/runtime:latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up pixi
uses: ./.github/actions/setup-pixi
with:
environments: ''
activate-environment: ''
run-install: false
frozen: false
- name: Init pixi project
run: pixi init
- name: Add Python from Conda
run: pixi add "python=3.13"
- name: Add easydiffraction and its dev deps from PyPI
run: pixi add --pypi "easydiffraction[all]"
- name: Check if Jupyter Notebooks run without errors
run: >
python -m pytest --nbmake docs/docs/tutorials/ --nbmake-timeout=600
--color=yes -n auto -v
Currently, we do not have a dedicated CI step to verify that tutorials run correctly in Google Colab. Since Colab support is important for workshops and new users, we should explore adding an automated test step (possibly using the official Colab Docker image) to ensure tutorials execute successfully in a Colab-like environment.
Note that setting up and maintaining the local runner environment will be necessary.
Based on:
https://github.com/orgs/easyscience/discussions/24#discussioncomment-12488172
Here is a draft implementation of
tutorial-tests-colab.yml: