-
Notifications
You must be signed in to change notification settings - Fork 106
80 lines (65 loc) · 2.28 KB
/
pg-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
68
69
70
71
72
73
74
75
76
77
name: Test PG
on: [push]
jobs:
build:
name: Frw-Tests (3.11 PG-SQL)
runs-on: ubuntu-latest
services:
postgres:
image: postgres:11
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: tvb-test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: set up Python
uses: actions/setup-python@v4
id: setPy
with:
python-version: "3.11"
- 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: pip--${{ hashFiles('tvb_build/docker/requirements_group') }}
- name: install tools and dependencies
# if: steps.cache-local.outputs.cache-hit != 'true'
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
python3 -m pip install cryptography
python3 -m pip install lockfile
python3 -m pip install syncrypto
python3 -m pip install -r tvb_build/docker/requirements_group
pip3 install --user --no-build-isolation tvb-gdist
- name: setup tvb
run: cd tvb_build && bash install_full_tvb.sh
- name: cache data
id: cache-data
uses: actions/cache@v3
with:
path: demo_data
key: tvb-data-10128131
- name: download data
if: steps.cache-data.outputs.cache-hit != 'true'
run: |
wget -q https://zenodo.org/record/10128131/files/tvb_data.zip?download=1 -O tvb_data.zip
mkdir demo_data
unzip tvb_data.zip -d demo_data
rm tvb_data.zip
- name: setup data
run: cd demo_data && python3 setup.py develop
- name: run framework tests
run: |
cd tvb_framework
pytest tvb/tests/framework --profile=TEST_POSTGRES_PROFILE