Skip to content

Look into alternative ways of running the notebook examples as tests #832

@shimwell

Description

@shimwell

Remi makes use of a different menthod of running the test notebooks.

Compare this to what we have and see if we can upgrade the method used

# This is a basic workflow to help you get started with Actions

name: Test demos

# Controls when the action will run. 
on:
  # Triggers the workflow on push or pull request events but only for the master branch
  push:
    branches:
    - master
    - dev
  pull_request:
    branches:
    - master
    - dev

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  # This workflow contains a single job called "build"
  build:
    # The type of runner that the job will run on
    runs-on: ubuntu-latest
    container: quay.io/fenicsproject/stable:latest
    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
      - uses: actions/checkout@v2

      # Runs a single command using the runners shell
      - name: Run the notebooks
        run: |
          jupyter-nbconvert --to python demos/demo_multi_materials.ipynb
          mkdir outputs
          python3 -m demos.demo_multi_materials
          jupyter-nbconvert --to python demos/demo_meshes.ipynb
          python3 -m demos.demo_meshes
          jupyter-nbconvert --to python demos/demo_derived_quantities.ipynb
          python3 -m demos.demo_derived_quantities
          jupyter-nbconvert --to python demos/demo_Ogorodnikova.ipynb
          python3 -m demos.demo_Ogorodnikova
          jupyter-nbconvert --to python demos/demo_coupled_heat_transfer.ipynb
          python3 -m demos.demo_coupled_heat_transfer

Originally posted by @RemDelaporteMathurin in #830 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions