Skip to content

Pin vtk since old pyvista is not compatible with vtk 9.4.0 #1973

Pin vtk since old pyvista is not compatible with vtk 9.4.0

Pin vtk since old pyvista is not compatible with vtk 9.4.0 #1973

Workflow file for this run

name: multiphenicsx CI
on:
push:
branches:
- "**"
pull_request:
branches:
- main
schedule:
- cron: "0 3 * * *"
workflow_call:
workflow_dispatch:
jobs:
test:
if: >-
(
(
github.event_name == 'schedule'
&& github.repository == 'multiphenics/multiphenicsx'
) || (
github.event_name != 'schedule'
&& !(
contains(github.event.head_commit.message, '[ci skip]')
|| contains(github.event.head_commit.message, '[skip ci]')
)
)
)
runs-on: ubuntu-latest
container: ghcr.io/fenics/dolfinx/dolfinx:v0.7.2
strategy:
matrix:
petsc_arch: [real, complex]
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
ref: dolfinx-v0.7.2
- name: Setup container
run: |
. /usr/local/bin/dolfinx-${{ matrix.petsc_arch }}-mode
echo "PETSC_ARCH=$PETSC_ARCH" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV
rm /usr/local/lib/python3.10/dist-packages/petsc4py/py.typed
- name: Install multiphenicsx
run: |
python3 -m pip install .[docs,lint,tests,tutorials]
python3 -c "import multiphenicsx.cpp"
- name: Run flake8 and mypy checks on python files
run: |
python3 -m flake8 .
python3 -m mypy .
- name: Run documentation generation
run: |
cd docs && make html
- name: Run unit tests (serial)
run: |
COVERAGE_FILE=.coverage_unit_serial python3 -m coverage run --source=multiphenicsx -m pytest tests/unit
- name: Run unit tests (parallel)
run: |
COVERAGE_FILE=.coverage_unit_parallel mpirun -n 2 python3 -m coverage run --source=multiphenicsx --parallel-mode -m pytest tests/unit
- name: Combine coverage reports
run: |
python3 -m coverage combine .coverage*
python3 -m coverage report --fail-under=100 --show-missing --skip-covered
- name: Run flake8 and mypy checks on tutorial files
run: |
NO_TESTS_COLLECTED=5
python3 -m pytest --ipynb-action=create-notebooks tutorials || (($?==$NO_TESTS_COLLECTED))
python3 -m pytest --ipynb-action=create-notebooks --np=2 tutorials || (($?==$NO_TESTS_COLLECTED))
python3 -m nbqa flake8 .
python3 -m nbqa mypy .
shell: bash
- name: Check for stray outputs, counts and metadata in tutorial files
uses: RBniCS/check-jupyter-metadata-action@main
with:
pattern: "tutorials/**/*.ipynb"
- name: Run tutorials (serial)
run: |
python3 -m pytest tutorials
- name: Run tutorials (parallel)
run: |
python3 -m pytest --np 2 tutorials
- name: Upload tutorials logs as an artifact in case of failure
if: failure() || cancelled()
uses: actions/upload-artifact@v3
with:
name: "tutorials-logs-${{ matrix.petsc_arch }}"
path: |
tutorials/**/.ipynb_pytest/**/*.log*