-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TVB-50 Add script for testing tvb-contrib
- Loading branch information
Showing
1 changed file
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Check tvb-contrib | ||
on: [push] | ||
|
||
jobs: | ||
build: | ||
name: Test tvb-contrib | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
|
||
- name: set up Python 3.10 | ||
uses: actions/setup-python@v4 | ||
id: setPy | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: put ~/.local/bin on $PATH | ||
run: echo "PATH=$HOME/.local/bin:$PATH" >> $GITHUB_ENV | ||
|
||
- name: install tools and dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt install libbz2-dev libhdf5-serial-dev liblzo2-dev | ||
python3 -m pip install --upgrade setuptools==59.8.0 pip wheel | ||
pip3 install --user --upgrade numpy | ||
python3 -m pip install scikit-build | ||
pip3 install --user --no-build-isolation tvb-gdist | ||
cd tvb_library | ||
pip install -e . --user | ||
- 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/8331301/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 contrib tests | ||
run: | | ||
cd tvb_contrib | ||
pytest tvb | ||