-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (90 loc) · 2.43 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
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