-
Notifications
You must be signed in to change notification settings - Fork 29
/
bitbucket-pipelines.yml
53 lines (52 loc) · 1.54 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
pipelines:
default:
- step:
name: Lint by Flake8
image: python:3.8
script:
- pip install flake8-bugbear flake8
- flake8 bvp
- step:
name: Build and Test
image: python:3.8
caches:
- pip
script:
- ci/SETUP.sh
- apt-get update
- apt-get -y install postgresql-client coinor-cbc
- PGPASSWORD=a1test psql -h localhost -p 5432 -c "create extension if not exists cube; create extension if not exists earthdistance;" -U a1test a1test;
- make install-deps
- python setup.py test
services:
- postgres
branches:
master:
- step:
name: Build and Test
image: python:3.8
script:
- ci/SETUP.sh
- apt-get update
- apt-get -y install postgresql-client coinor-cbc
- PGPASSWORD=a1test psql -h localhost -p 5432 -c "create extension if not exists cube; create extension if not exists earthdistance;" -U a1test a1test;
- make install-deps
- python setup.py test
caches:
- pip
services:
- postgres
- step:
name: Deploy to Staging
deployment: staging
script:
- ci/DEPLOY.sh
definitions:
services:
postgres:
image: postgres
environment:
POSTGRES_DB: a1test
POSTGRES_USER: a1test
POSTGRES_PASSWORD: a1test
DATABASE_URL: postgres://a1test:a1test@127.0.0.1:5432/a1test