-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitbucket-pipelines.yml
31 lines (30 loc) · 1009 Bytes
/
bitbucket-pipelines.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
image: python:3.9.5-alpine
pipelines:
pull-requests:
'**':
- step:
script:
- apk add --no-cache --update build-base libffi-dev postgresql-client postgresql-dev postgresql-libs
- echo "127.0.0.1 db uuidmock" > /etc/hosts
- PGPASSWORD=password psql -h db -d antibodydb_test -U postgres -f deploy/postgresql_init_scripts/create_tables.sql
- export VIRTUAL_ENV=${PWD}
- python3 -m venv $VIRTUAL_ENV
- export PATH="$VIRTUAL_ENV/bin:$PATH"
- python3 -m pip install --upgrade pip
- pip install -r requirements-dev.txt
- cd server
- pip install -e .
- pytest -v
services:
- postgres
- uuidmock
definitions:
services:
postgres:
image: postgres
environment:
POSTGRES_DB: antibodydb_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
uuidmock:
image: mockserver/mockserver