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
48 lines (37 loc) · 1.87 KB
/
shippable.yml
File metadata and controls
48 lines (37 loc) · 1.87 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
language: python
python:
- 2.7
- 2.6
install:
- pip install -r requirements.txt
addons:
postgresql: "9.1"
# 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
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: Frr0m4gvASImyseMvGe58LHWsh3DbEBz2NsySKSHcHGnIXps8xg6xjGXRKevxDsUrNIOywV9JJGBMaqxhWSJGRP7I0XWQ1+odHKMNMCp6bLSo+lCveairnndRgnievx7XMnah8oomHuMUoAehq201sQ4QUKJCBBFmpmeEt7o8F5WqyXNLdSqVbB4dJ8yMcrjjSOtXSYbVq90nkBwC2GqriSr9NKbGvcy/QI0zYSpllT7Oulj0tWjOIo+raUazWr/aNfyarAjrf3lTBJdkFxXzMYCS5ubLVdOIZUvWVotlv1PiH/igW9kEblzzNymJaRNkLYJsOn6NOIHAFKVsbGKxA==
# - secure: e3IF2H+i8bq+GzgbMoR1WY5WAYqOYviZWWUQobtNAVW0Lq1N1EJURJ98L34vf7Yrsx9YBuaOGAcRFx7MDNyrNtmPkXtZVkODSBzRIwwwCO3D3wrSIig6QxvRGRmDMIIMFFTf92SRcu0WfwD+qe9aQSH5hDM5uqOQX7tsD+xScaiGF5ShvhrBjHZNOq7LlLwU1LpmJCj7RlwzCVGSqdUicAhhh5xBK+QmJkC6BQWJq9OZsNchwQKDmacDoyZbqrpSmclbkNuSG6x6EE0HZ/WKYbadCjxRMFtk0wVsQsfkMh42/jNMalkLDpMBfa+/3C6nwanXm0yfqdMdAi+IGv9xUA==
#cache: true
after_script:
- cp README.md ./shippable
- echo $beta
archive: true
notifications:
email:
recipients:
- buildsampletest@gmail.com
on_success: always
on_failure: change
#build_image: shippable/minv2:beta