-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
95 lines (90 loc) · 4.81 KB
/
.travis.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
language: python
sudo: required
group: edge
cache:
- pip
python:
- 2.7
# - 3.5
stages:
- name: test
- name: deploy-binaries
if: tag IS present AND repo = "geokrety/geokrety-api"
- name: deploy-documentation
if: tag IS present AND repo = "geokrety/geokrety-api"
jobs:
include:
- stage: test
name: testing code
services:
- rabbitmq
addons:
- mariadb: '10.0'
- apt:
packages:
- python-dev
- libmysqlclient-dev
env:
- >-
APP_CONFIG="config.TestingConfig"
DATABASE_URL=mysql+mysqldb://root@localhost/geokrety_unittest?charset=utf8mb4
TEST_DATABASE_URL=mysql+mysqldb://root@localhost/geokrety_unittest?charset=utf8mb4
SERVE_STATIC=true
MINIO_ACCESS_KEY=access_key
MINIO_SECRET_KEY=secret_key
MINIO_ENDPOINT=127.0.0.1:9000
MINIO_BROWSER=off
before_script:
- wget https://dl.minio.io/server/minio/release/linux-amd64/minio && chmod +x minio
- mkdir .vars && ./minio server .vars &
- mysql -e 'FLUSH TABLES; DROP DATABASE IF EXISTS geokrety_unittest; CREATE DATABASE geokrety_unittest CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'
- pip install -r requirements/tests.txt
script:
- nosetests tests/ -v --with-coverage --with-id --nologcapture --stop
after_success:
- 'bash <(curl -s https://codecov.io/bash)'
- python-codacy-coverage -r coverage.xml
# - 'if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then cat docs/*.apib > apiary.apib; dredd; fi' # TODO: Enable later, it's quite long during initial dev
- stage: deploy-binaries
name: deploy binaries
script:
- python setup.py sdist
deploy:
- provider: releases
api_key:
secure: pOLHKxFohWDtsZWupq0ps0R4xsun2AoStnkU1seOvP526AhCQRDrPlRxmtdLelGssyGvVT5vmjlUO59UZFeOPU8QF23ekvZxjWOpJaMB9zuV4b5SFEmi79n3QMRLbotLuSqA0zsd+eff1HBCbXwT/qSMVRNvCpylCQG+Ibtel6RzZrSkG46n7X2tJSkvfp51C204SN+BvGjY2cDGz09LNFNDc7WNHFZfndJvahCb7yimcjwA4Q8jCC+oRyyO5D3Vqij69C0/nHctpPuoHjJsQLfrl3NKCMQrBenpLX1sGrJWjGQLHmyf8WEt3XDXFiupmsuYjLsvpDg+GKbKrxZUN51MJ8oRlJ5O8Y/LVPQmMXx0RZjy/ffp0EZJELA60P1cr0DG09JVobR4++ZWl2fgPuGeg0nTBuiSX5oQQcLgrerk59sXwbh8QoecMrpWl9UP5uqh4mTFWbvKgy1kEAYhopyrlpMD4wlqL4d+nH9HTEd0mTGGzC2MxtnEbu9ErR0gJcBlkVA81L9tdvQuBpN9aRnuy1/c98pOjqLf1+oqzHl0wsLEzPF6SlGU9MYBk+KflEo3dcNGFNcaA/ULZdA1Z9NDskEFqXi9dsCi0hH4fEvr6PIarREZCRt8AivounWZVkaL6KrcFPFfdLk6tu+iGlQ3uc0VX+Vt6Vyc1Y5c4Kw=
file_glob: true
file: dist/geokrety-api-*.tar.gz
skip_cleanup: true
on:
repo: geokrety/geokrety-api
tags: true
- provider: pypi
user: geokrety-bot
password:
secure: MTfwKPOeG79UuNaLWjlCxtoP97CGCJkVKr5Cn9zAN/7wEetfra+9bT/1NKCB8ZwHh6mdE3tOwwV4fDr9gzlM78MtxH9qCTvgPjt/gPi1/2fJoQ75f40ytvDru8YIDtkCEF0eqlYdRBEP1CuC+6c+TYYRMw8QRZbC5+L2zPnrSQscAjU9HugPZt/+WT3iH1qTRPAyHdqnBCEN8RHHGMrYZTHwmGUPk4z63ZUFip7lsubVrDoXYn8GadwBMGpFxh43f8MMVU7ffc8C8FHK1eoaTXHIVTbiHlB95BFa7hkhEvSeqi397G7dsT1NLSzRF+kIF9VvsQYcaOuncGAQNwfWxu3cMUM8XkFgXjOy2jUd2L1mSBgokhukX3F7/kwN0RTp3AX64P6Vqa17R5+hVOiTW6WYhpN1Qg+HAjHOihn1Z6Geg8KLlrxF1zZGfmUnjrRC/szBZd6z78QPgAYO+LqMSrDGoo82cD/MYe02QglHIJQpPjmeQxZJpZmOLYJYJgqc24O4oJYI3LuunUVaM9HWo4Yd+dbg1wyO4n8BRaEINGXeP63Qnw8RnkA7iRLsniaNs9R/hPp9OihuOn4BUOvMkuVehhti95ghL+UJCkwIOXnKAnfEG7sLKMsC0YCMe4KHAEMvzvp1FhEjkXBVKwv4datMMWTNJULtVT4dzUToT1c=
on:
repo: geokrety/geokrety-api
tags: true
- stage: deploy-documentation
name: deploy documentation
language: node_js
cache:
- directories:
- $HOME/.nvm/versions/node/
before_install:
- npm install -g aglio
script:
- aglio -i docs/apiary.apib -o docs/index.html --theme-variables slate --theme-full-width --no-theme-condense
deploy:
- provider: pages
skip_cleanup: true
local_dir: docs/
github_token:
secure: pOLHKxFohWDtsZWupq0ps0R4xsun2AoStnkU1seOvP526AhCQRDrPlRxmtdLelGssyGvVT5vmjlUO59UZFeOPU8QF23ekvZxjWOpJaMB9zuV4b5SFEmi79n3QMRLbotLuSqA0zsd+eff1HBCbXwT/qSMVRNvCpylCQG+Ibtel6RzZrSkG46n7X2tJSkvfp51C204SN+BvGjY2cDGz09LNFNDc7WNHFZfndJvahCb7yimcjwA4Q8jCC+oRyyO5D3Vqij69C0/nHctpPuoHjJsQLfrl3NKCMQrBenpLX1sGrJWjGQLHmyf8WEt3XDXFiupmsuYjLsvpDg+GKbKrxZUN51MJ8oRlJ5O8Y/LVPQmMXx0RZjy/ffp0EZJELA60P1cr0DG09JVobR4++ZWl2fgPuGeg0nTBuiSX5oQQcLgrerk59sXwbh8QoecMrpWl9UP5uqh4mTFWbvKgy1kEAYhopyrlpMD4wlqL4d+nH9HTEd0mTGGzC2MxtnEbu9ErR0gJcBlkVA81L9tdvQuBpN9aRnuy1/c98pOjqLf1+oqzHl0wsLEzPF6SlGU9MYBk+KflEo3dcNGFNcaA/ULZdA1Z9NDskEFqXi9dsCi0hH4fEvr6PIarREZCRt8AivounWZVkaL6KrcFPFfdLk6tu+iGlQ3uc0VX+Vt6Vyc1Y5c4Kw=
target_branch: gh-pages
keep-history: false
verbose: true
on:
repo: geokrety/geokrety-api
tags: true