-
Notifications
You must be signed in to change notification settings - Fork 17
51 lines (45 loc) · 1.49 KB
/
pythonapp.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
name: Unit networks
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- uses: actions/cache@v1
with :
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install MPI
run: |
sudo apt-get update
sudo apt-get install openmpi-bin libopenmpi-dev
# No longer needed to compile NEURON manually for unit test.
# - name: Install NEURON
# run: |
# wget https://neuron.yale.edu/ftp/neuron/versions/v7.7/7.7.2/nrn-7.7.2.x86_64-linux-py-37-36-35-27.deb
# sudo dpkg -i nrn-7.7.2.x86_64-linux-py-37-36-35-27.deb
# export PYTHONPATH=/usr/local/nrn/lib/python
# python -c "help('modules')"
# echo "PYTHONPATH=$PYTHONPATH"
# echo "/usr/local/nrn contains:"
# ls /usr/local/nrn
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install coverage
pip install wheel
pip install -e . # Install snudda as package on the build system.
- name: Run unittests and code coverage
run: |
coverage run -m unittest discover -v -s ./tests
coverage xml
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}