forked from clicheio/cliche
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
executable file
·76 lines (76 loc) · 4.91 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
language: python
env:
global:
# Note: The encrypted key under are encrypted for clicheio/cliche repository.
# For testing, encrypt environmental variables for your own repository, and
# re-encrypt them for clicheio/cliche repository on pull request.
# Sentry
- secure: "bfyH1TMzsg/ueHoWXob3YlntuEwYip4qKBlZNXlUYeXdNAt3GtHuFvsLNP82y88p66pgqW+DsWzMSuCYVlqoCAM+rTfuszzD8TB7i6DqultbiXuq+7fBjfU1xqwPUlWiC245InFFWoVTKqo8jcBUNvg7JW8td/tSgTZZAW2GhTE="
# Twitter
- secure: "EfV35XpgCBgwuBUhbRKdi+YgRhZezJcvtpt1ZhkB4/+CC3QBLr6gDt9Vimqvdx2ZyUa8UQP5oWQ4q0YsRQf6c3qsmFHUU6ZVzMTHvRxSZ08o87kignYnlyd+RmfpSY08exwYdSrVnLbMn8igsLHuTVV1e5yOb2P8i+sXQOQQ4X8="
- secure: "Q2c5a4gFu9wVjOJP9V8amJr0q4JfobXHVDaEFwNj7U+qn9CfFDoAcWKPuy7NYF5nY/ShrhJ7TQfmry9yDYpantvFpt0Dpv3/INb+7t+xdy2hlIBVbcMwvqaR2DGp6Z0wsEaUop015fQnh9cvkNhKctFJsdUql3W6joNkNSfaZ0c="
# Deployment
- secure: "Z2DkX7b4AcBQCObHYn9ANILPwQRZSM1ShxScT/EnB1H9omOkAd4chCeMV8cK5/HqE8ft7sT159oKYuSXbggthOpUffj+5xsIHsa2MWqzh+iCa9H+QH9bTygpLYy3+BPuHfmaN6PpD1hxJK7TSUEhKLfTpMqlIz741g3vE087uwk="
- secure: "fxvA1nmP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gIcx6qc8pdTAxuV9sP0kDP4eGhvBA7/3TOb/B5cEG3fXaHpDoHGlU9eGYJuxAjA1iFlHWZfEuXdX0gexl3YifMjtdPwuS3s/uHulZfAQqkYM5IjJuAGJNO1VgoDd3eZqRSCWhEEYJVt4IueSiYi6lRFEA="
- secure: "AriQB92U1k0Djek2czndC5tYqx6TmwCZWmpzIwCfP+dF8pzT/d5pZmzWGh0KU2GnE4JGzZ8FzDtjVPmC4dzn+UPzuH5B1sj07V1lfUJIarSYQBxK0HgXPs1qIZ2f5Aup/OPwQ7kPDfc0qmP+3i9KcHcx8+qQkspPXDSv+ZKYABc="
- secure: "abpzA7DMzbAoOe8SvP3IgCC40WdzPyT1Xsuw0qF5bMZxfvoLAyHz/GfIXh8qoDsBjJgkbsaeRb3QQ25MNheoiqSTEFfoDK2syucqfQxTFpS+2cP1pfpARzLQDwRvTw8w1T1J86Yd3svdtfmIOmKHYg55sCb7tkJIMVan2Bt00WE="
- secure: "VuAQNt2USB4KO+OlzBN0GXbrf3dzkIWNu2Seh5iVMwUeD4vd4Fro2Wi6Ybd0k0sn0zzRK2h2sTgz+u/nGYy/IZd1hfUJyiGcuSI36+CLIgIHh/Uk5IvRxo4/9XfaV4Tiy1/deAG0gmc2TAXQSkeDWuWEEXhx8VHAx7CGt8mkIxQ="
python:
- 3.4
- 3.3
addons:
postgresql: "9.3"
before_install:
# gcc >= 4.7 is needed for -std=c++11
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update -qq
- if [[ "$TRAVIS_REPO_SLUG" == "clicheio/cliche" && "$TRAVIS_BRANCH" == "master" &&
"$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_JOB_NUMBER" == "$TRAVIS_BUILD_NUMBER.1" ]];
then openssl aes-256-cbc -k $KEY_ENCRYPTION_KEY -in deploy/cliche_deploy_key.enc
-out deploy/cliche_deploy_key -d; fi;
install:
# gcc >= 4.7 is needed for -std=c++11
- sudo apt-get install -qq gcc-4.8 g++-4.8 libstdc++-4.8-dev
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 20
# install cliche
- pip install -e .[tests]
- pip install pytest-cov flake8 coveralls
before_script:
- createdb -U postgres cliche_test
- createdb -U postgres alembic_test
script:
# alembic test
- echo "DATABASE_URL = 'postgresql:///alembic_test?user=postgres'" > alembic_test.cfg.py
- cliche upgrade -c alembic_test.cfg.py 27e81ea4d86
- cliche upgrade -c alembic_test.cfg.py
- cliche upgrade -c alembic_test.cfg.py 27e81ea4d86
# setup.py test
- python setup.py history -c alembic_test.cfg.py
# unit test
- py.test -v --cov cliche --durations=20 --database-url='postgresql:///cliche_test?user=postgres'
- py.test -v --durations=20
# lint
- hooks/pre-commit
after_success:
- coveralls
- chmod 600 deploy/cliche_deploy_key
- if [[ "$TRAVIS_REPO_SLUG" == "clicheio/cliche" && "$TRAVIS_BRANCH" == "master" &&
"$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_JOB_NUMBER" == "$TRAVIS_BUILD_NUMBER.1" ]];
then deploy/deploy.py -i deploy/cliche_deploy_key -b "$TRAVIS_BUILD_NUMBER"
-c deploy/prod.cfg.yml -d "$DBHOST" --db-username "$DBUSER" --db-password "$DBPASSWORD"
-r "$REDISHOST" --redis-password "$REDISPASSWORD" --sentry-dsn "$SENTRY_DSN"
--crawler "$CRAWLER1" --crawler "$CRAWLER2"
--web-worker "$WEB1" --web-worker "$WEB2" --beat "$BEAT"; fi;
notifications:
irc:
channels:
- "irc.ozinger.org#cliche.io"
on_success: change
on_failure: always