-
Notifications
You must be signed in to change notification settings - Fork 0
/
wercker.yml
55 lines (45 loc) · 1.4 KB
/
wercker.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
box: python:2.7
services:
- id: postgres
env:
POSTGRES_PASSWORD: password
POSTGRES_USER: namemycat
build:
steps:
- script:
name: "Wait for Postgres to come up"
code: |
while ! $(python -c "import socket; soc=socket.socket(); soc.connect(('$POSTGRES_PORT_5432_TCP_ADDR', $POSTGRES_PORT_5432_TCP_PORT))"); do sleep 3; done
test:
steps:
- pip-install
- script:
name: "Set environment variables"
code: |
export PG_HOST=$POSTGRES_PORT_5432_TCP_ADDR
export PG_PORT=$POSTGRES_PORT_5432_TCP_PORT
export PG_USER=$POSTGRES_ENV_POSTGRES_USER
export PG_PASS=$POSTGRES_ENV_POSTGRES_PASSWORD
export FLASK_APP=namemycat.py
export FLASK_DEBUG=0
- script:
name: Run Integration tests
code: |
python tests.py -v IntegrationTests
- script:
name: Run Functional tests
code: |
python tests.py -v FunctionalTests
- script:
name: Check code coverage
code: |
coverage run --include namemycat.py tests.py
coverage report
deploy:
steps:
- script:
code: |
echo "This is where we would build and push our docker image to a registry"
- script:
code: |
echo "This is where we would tell Kubernetes to deploy our container"