forked from gyorilab/emmaa
-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (91 loc) · 4.09 KB
/
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Tests
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
# Set up postgres
services:
postgres:
image: postgres:9.6
env:
POSTGRES_PASSWORD: password
POSTGRES_USER: postgres
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
# Check out the repo
- uses: actions/checkout@v2
# Cache pip packages
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
# Set up Python 3.7
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
# Install EMMAA/test dependencies
- name: Install dependencies
run: |
sudo apt-get install libpq-dev
psql --no-password -h localhost -c 'create database emmaadb_test;' -U postgres
wget -nv https://files.pythonhosted.org/packages/91/a1/55b8224cbc9986bbad4b8f0f2dd11892845156b759b3495202d457ca0b73/kappy-4.0.94-cp37-cp37m-manylinux2010_x86_64.whl
mv kappy-4.0.94-cp37-cp37m-manylinux2010_x86_64.whl kappy-4.0.94-cp37-cp37m-manylinux2010_x86_64.zip
unzip kappy-4.0.94-cp37-cp37m-manylinux2010_x86_64.zip
sudo apt-get install graphviz libgraphviz-dev pkg-config
python -m pip install --upgrade pip
pip install nose coverage flask pyyaml boto3 openpyxl
pip install git+https://github.com/sorgerlab/indra.git
pip uninstall -y enum34
pip install cachetools matplotlib
pip install git+https://github.com/indralab/indra_db.git
pip install git+https://github.com/indralab/indra_reading.git
pip install git+https://github.com/sorgerlab/bioagents.git
git clone https://github.com/indralab/indra_world.git
git clone https://github.com/indralab/covid-19.git
git clone https://github.com/indralab/ui_util.git
cd ui_util/indralab_auth_tools
pip install .
cd ../indralab_web_templates
pip install .
cd ../..
git clone https://github.com/ml4ai/automates.git
cd automates
git checkout claytonm/gromet
cd ..
pip install boto3 jsonpickle pygraphviz fnvhash inflection pybel==0.15 flask_jwt_extended==3.25.0 gilda tweepy nose coverage moto[iam] sqlalchemy_utils termcolor flask-cors
pip install --no-dependencies .
pip install -U sqlalchemy==1.3.23
wget "https://github.com/RuleWorld/bionetgen/releases/download/BioNetGen-2.4.0/BioNetGen-2.4.0-Linux.tgz" -O bionetgen.tar.gz -nv
tar xzf bionetgen.tar.gz
env:
POSTGRES_PORT: 5432
PGPASSWORD: password
- name: Run unit tests
run: |
export AWS_DEFAULT_REGION='us-east-1'
export NOSEATTR="!notravis"
export NOSEATTR=$(if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then echo $NOSEATTR,!nonpublic; else echo $NOSEATTR; fi)
export PYTHONPATH=$PYTHONPATH:`pwd`/covid-19:`pwd`/kappy:`pwd`/indra_world:`pwd`/automates/scripts/gromet
export BNGPATH=`pwd`/BioNetGen-2.4.0
export INDRA_WM_CACHE="."
nosetests -v -a $NOSEATTR emmaa/tests/test_s3.py
nosetests -v -a $NOSEATTR --ignore-files='.*test_s3.py' --with-coverage --cover-inclusive --cover-package=emmaa -w emmaa/tests
env:
POSTGRES_PORT: 5432
PGPASSWORD: password
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
INDRA_DB_REST_URL: ${{ secrets.INDRA_DB_REST_URL }}
INDRA_DB_REST_API_KEY: ${{ secrets.INDRA_DB_REST_API_KEY }}
INDRADB_JWT_SECRET: ${{ secrets.INDRADB_JWT_SECRET }}
INDRALAB_USERS_DB: ${{ secrets.INDRALAB_USERS_DB }}
EMMAADBTEST: ${{ secrets.EMMAADBTEST }}
EMAIL_SIGN_SECRET: ${{ secrets.EMAIL_SIGN_SECRET }}
XDD_API_KEY: ${{ secrets.XDD_API_KEY }}