-
Notifications
You must be signed in to change notification settings - Fork 2
93 lines (91 loc) · 2.61 KB
/
pr-wf.yaml
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: PR pipeline to verify tests and code rules
on: [pull_request]
jobs:
Python-tests:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.8]
services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
postgres:
image: postgres:13
env:
POSTGRES_PASSWORD: multiomics
POSTGRES_USER: multiomics
POSTGRES_DB: multiomics
POSTGRES_HOST_AUTH_METHOD: trust
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
mongo:
image: "mongo:4.2"
env:
MONGO_INITDB_ROOT_USERNAME: multiomics
MONGO_INITDB_ROOT_PASSWORD: multiomics
MONGO_INITDB_DATABASE: multiomics
options: >-
--health-cmd "/bin/bash -c 'mongo --norc --quiet --host=localhost:27017 --eval \"db.getMongo()\"'"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 27017:27017
env:
REDIS_HOST: localhost
REDIS_PORT: 6379
MONGO_HOST: localhost
MONGO_DB: multiomics
MONGO_USERNAME: multiomics
MONGO_PASSWORD: multiomics
POSTGRES_USERNAME: multiomics
POSTGRES_PASSWORD: multiomics
POSTGRES_HOST: localhost
POSTGRES_DB: multiomics
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Create virtual environment
run: |
pip install virtualenv
virtualenv venv
- name: Install Dependencies
run: |
. venv/bin/activate
pip install -r config/requirements.txt
- name: Run Tests
run: |
. venv/bin/activate
python src/manage.py test src --settings=multiomics_intermediate.settings_ci
Node-checks:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: NPM install
run: npm --prefix src/frontend/static/frontend i
- name: NPM linter checks
run: npm --prefix src/frontend/static/frontend run check-all