forked from tmlbl/sample_python_postgres
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathshippable.yml
More file actions
52 lines (45 loc) · 1.76 KB
/
shippable.yml
File metadata and controls
52 lines (45 loc) · 1.76 KB
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
language: python
build_image: drydock/u14pytpls:prod
python:
- 2.7
- 2.6
- 3.2
- 3.3
before_install:
- if [[ $SHIPPABLE_PYTHON_VERSION == '3.2' ]]; then pip install coverage==3.7.1 codecov ; fi
install:
- pip install -r requirements.txt
#addons:
# postgresql: "9.2"
# Postgres binds to 127.0.0.1 by default and is started on boot. Default username is "postgres" with no password
# Create a DB as part of before script to use it
before_script:
- psql -c 'drop database if exists test;' -U postgres -w
- psql -c "create database test;" -U postgres
- mkdir -p shippable/testresults
- mkdir -p shippable/codecoverage
- echo $key1 and $key2 and $FOO
- psql --version
- psql -U postgres -c "show SERVER_VERSION"
services:
#- mysql
- postgres
script:
- nosetests test.py --with-xunit --xunit-file=shippable/testresults/nosetests.xml
- which python && coverage run --branch test.py
- which python && coverage xml -o shippable/codecoverage/coverage.xml test.py
env:
global:
- FOO=fooval SHIPPABLE_POSTGRES_CMD='sudo -u postgres $SHIPPABLE_POSTGRES_BINARY -c config_file=/etc/postgresql/$SHIPPABLE_POSTGRES_VERSION/main/postgresql.conf -c fsync=off'
# - secure: e3IF2H+i8bq+GzgbMoR1WY5WAYqOYviZWWUQobtNAVW0Lq1N1EJURJ98L34vf7Yrsx9YBuaOGAcRFx7MDNyrNtmPkXtZVkODSBzRIwwwCO3D3wrSIig6QxvRGRmDMIIMFFTf92SRcu0WfwD+qe9aQSH5hDM5uqOQX7tsD+xScaiGF5ShvhrBjHZNOq7LlLwU1LpmJCj7RlwzCVGSqdUicAhhh5xBK+QmJkC6BQWJq9OZsNchwQKDmacDoyZbqrpSmclbkNuSG6x6EE0HZ/WKYbadCjxRMFtk0wVsQsfkMh42/jNMalkLDpMBfa+/3C6nwanXm0yfqdMdAi+IGv9xUA==
#cache: true
after_script:
- cp README.md ./shippable
archive: true
notifications:
email:
recipients:
- buildsampletest@gmail.com
on_success: always
on_failure: always
#build_image: shippable/minv2:beta