Skip to content

Quick fix: Moves the assert checking for mpi4py not in sys.modules to… #142

Quick fix: Moves the assert checking for mpi4py not in sys.modules to…

Quick fix: Moves the assert checking for mpi4py not in sys.modules to… #142

Workflow file for this run

name: CI
on:
push:
branches: [dev*, master]
pull_request:
branches:
- master
env:
PYTEST_DISABLE_PLUGIN_AUTOLOAD: 1 # To ensure that Autoload do not change test behavior
# A workflow run is made up of one or more jobs that
# can run sequentially or in parallel
jobs:
pylint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: mpi4py/setup-mpi@v1
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint==2.14.5 pytest
python setup.py egg_info
pip install -r *.egg-info/requires.txt
- name: Analysing the code with pylint
run: |
pylint --unsafe-load-any-extension=y --disable=fixme $(git ls-files '*.py') || true
build:
needs: [pylint]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
py-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
py-arch:
- x64
mpi:
- mpich
- openmpi
- intelmpi
- msmpi
os:
- ubuntu-latest
- macos-latest
- windows-2022
exclude:
- os: macos-latest
mpi: intelmpi
- os: macos-latest
mpi: msmpi
- os: windows-2022
mpi: mpich
- os: windows-2022
mpi: openmpi
- os: windows-2022
mpi: intelmpi
- os: ubuntu-latest
mpi: msmpi
- os: ubuntu-latest
py-version: 3.8
mpi: mpich
- os: ubuntu-latest
py-version: 3.9
mpi: mpich
name: ${{ matrix.mpi }} - ${{matrix.py-version}} - ${{matrix.os}}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py-version }}
- name: Setup MPI
uses: mpi4py/setup-mpi@v1
with:
mpi: ${{ matrix.mpi }}
- run: pip install .
# Unit testing
- run: pytest -p no:pytest_parallel ./pytest_parallel/test
# MPI parallel testing
- run: pytest -p no:pytest_parallel ./test/test_pytest_parallel.py
# Test extra facilities
- run: mpiexec -n 3 pytest -p parallel ./test/test_pytest_parallel_extra.py