Test tutorial against DOLFINx #1141
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: Test tutorial against DOLFINx | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: | |
- main | |
workflow_call: | |
inputs: | |
tag: | |
description: "Tag of DOLFINx docker image" | |
default: "stable" | |
required: true | |
type: string | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: "Tag of DOLFINx docker image" | |
default: "stable" | |
required: true | |
type: string | |
schedule: | |
- cron: "* 9 * * 1" | |
env: | |
DEFAULT_TAG: nightly | |
jobs: | |
get_image_tag: | |
runs-on: ubuntu-latest | |
outputs: | |
image: ${{ steps.docker_tag.outputs.image }} | |
steps: | |
- id: docker_tag | |
run: echo "image=${{ inputs.tag || env.DEFAULT_TAG }}" >> $GITHUB_OUTPUT | |
build-book: | |
needs: get_image_tag | |
runs-on: ubuntu-latest | |
container: dolfinx/lab:${{ needs.get_image_tag.outputs.image }} | |
env: | |
PYVISTA_JUPYTER_BACKEND: static | |
PYVISTA_OFF_SCREEN: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
python3 -m pip install -e .[dev] -U | |
- name: Ruff formatting checks | |
run: | | |
ruff format . | |
ruff check . | |
- name: Run mypy | |
run: python3 -m mypy . | |
- name: Test building the book | |
run: jupyter-book build . -W --all | |
- name: Upload the book | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docs | |
path: _build/html |