-
Notifications
You must be signed in to change notification settings - Fork 12
64 lines (52 loc) · 1.48 KB
/
ci.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
name: Run tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.8, 3.x]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
pip install -r requirements.txt
- name: Install Linux dependencies
run: |
sudo apt-get install openmpi-bin libopenmpi-dev
pip install mpi4py
pip install petsc petsc4py
env:
PETSC_CONFIGURE_OPTIONS: '--download-mumps --download-scalapack'
if: matrix.os == 'ubuntu-latest'
- name: Lint with flake8
run: |
flake8 . --count --show-source --statistics
- name: Clone JaDaPy
uses: actions/checkout@v3
with:
repository: BIMAU/jadapy
path: jadapy
- name: Install JaDaPy
run: |
cd jadapy
pip install .
- name: Test with pytest
run: |
pytest -v -o console_output_style=classic tests
- name: Run parallel tests
run: |
mpiexec --oversubscribe -n 4 pytest -v -o console_output_style=classic tests
if: matrix.os == 'ubuntu-latest'