-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Test notebook execution | ||
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Test notebook execution | ||
runs-on: self-hosted | ||
container: | ||
image: firedrakeproject/firedrake:latest | ||
options: --shm-size 2g | ||
|
||
env: | ||
OMP_NUM_THREADS: 1 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Load pyrol wheel from cache | ||
uses: actions/cache@v3 | ||
id: cache-pyrol | ||
with: | ||
path: /tmp/wheels | ||
key: pyrol | ||
|
||
- name: Build pyrol wheel | ||
if: steps.cache-pyrol.outputs.cache-hit != 'true' | ||
run: | | ||
/home/firedrake/firedrake/bin/pip wheel -r git+https://github.com/angus-g/[email protected] -w /tmp/wheels | ||
- name: Install Python dependencies | ||
run: | | ||
. /home/firedrake/firedrake/bin/activate | ||
python3 -m pip install --no-index -f /tmp/wheels pyroltrilinos | ||
python3 -m pip install nbval | ||
python3 -m pip install git+https://github.com/g-adopt/g-adopt@adjoint-cases-testing | ||
- name: Run test | ||
run: | | ||
. /home/firedrake/firedrake/bin/activate | ||
pytest --nbval *.ipynb |