forked from the-virtual-brain/tvb-root
-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (52 loc) · 1.92 KB
/
lib-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
65
66
67
name: Test lib
on: [push]
jobs:
lib-tests:
runs-on: self-hosted
steps:
- name: nvidia-smi test
run: nvidia-smi
- name: pycuda test
run: python3 -c "import pycuda.autoinit; print('yes')"
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: put ~/.local/bin on $PATH
run: echo "PATH=$HOME/.local/bin:$PATH" >> $GITHUB_ENV
- name: cache ~/.local for pip deps
id: cache-local
uses: actions/cache@v3
with:
path: ~/.local
key: ${{ runner.os }}-pip-${{ hashFiles('tvb_library/requirements.txt') }}
- name: pip install dependencies
if: steps.cache-local.outputs.cache-hit != 'true'
run: |
python3 -m pip install --upgrade pip
pip3 install --user -r tvb_library/requirements.txt
pip3 install --user --no-build-isolation tvb-gdist
- name: setup tvb
run: cd tvb_library && python3 setup.py develop --user --no-deps
- name: cache data
id: cache-data
uses: actions/cache@v3
with:
path: tvb_data
key: tvb-data
- name: download data
if: steps.cache-data.outputs.cache-hit != 'true'
run: |
wget -q https://zenodo.org/record/4263723/files/tvb_data.zip?download=1 -O tvb_data.zip
mkdir tvb_data
unzip tvb_data.zip -d tvb_data
rm tvb_data.zip
- name: setup data
run: |
cd tvb_data
python3 setup.py develop
- name: run library tests
run: cd tvb_library && python3 -m pytest -n12 --ignore=tvb/tests/library/simulator/rateml_test.py
- name: run library benchmarks
run: cd tvb_library && python3 -m pytest --benchmark-only --ignore=tvb/tests/library/simulator/rateml_test.py
- name: run rateml tests
run: cd tvb_library/tvb/tests/library/simulator/ && pytest rateml_test.py