forked from jonescompneurolab/hnn-core
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (60 loc) · 1.93 KB
/
unit_tests.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: Unit tests
on:
push:
branches: ['**']
pull_request:
branches: ['**']
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.8]
steps:
- uses: actions/checkout@v4
- name: Install ubuntu dependencies
shell: bash -el {0}
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential wget
sudo DEBIAN_FRONTEND=noninteractive apt-get install libopenmpi-dev openmpi-bin
- name: Download and install Open MPI 4.1.1
run: |
wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.1.tar.gz
tar -xzf openmpi-4.1.1.tar.gz
cd openmpi-4.1.1
./configure --prefix=/usr/local
make -j$(nproc)
sudo make install
sudo ldconfig
- name: Check MPI version
shell: bash -el {0}
run: |
mpiexec --version
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test
python-version: ${{ matrix.python-version }}
fetch-depth: 2
- name: Install dependencies
shell: bash -el {0}
run: |
python -m pip install --upgrade pip
conda install --yes -c conda-forge mpi4py openmpi
- name: Install HNN-core
shell: bash -el {0}
run: |
pip install --verbose '.[opt, parallel, test, gui]'
#- name: Lint with flake8
# shell: bash -el {0}
# run: |
# flake8 --count hnn_core
- name: Test with pytest
shell: bash -el {0}
run: |
python -m pytest ./hnn_core/tests/test_dipole.py --cov=hnn_core --cov-report=xml -s
# - name: Upload coverage to Codecov
# shell: bash -el {0}
# run: |
# bash <(curl -s https://codecov.io/bash) -f ./coverage.xml