Skip to content

Instantly share code, notes, and snippets.

@pashinin
Last active February 3, 2017 20:34
Show Gist options
  • Save pashinin/0a79ce37075b1674c0725e0980366220 to your computer and use it in GitHub Desktop.
Save pashinin/0a79ce37075b1674c0725e0980366220 to your computer and use it in GitHub Desktop.
Travis notes
addons:
postgresql: "9.6"
hosts:
- pashinin.com
# apt:
# sources:
# # - deadsnakes # for python 3.5
# - sourceline: 'ppa:brightbox/ruby-ng'
# - sourceline: 'ppa:nginx/stable'
# packages:
# - nginx-full
# - supervisor
# - ruby2.3
# - ruby-mustache
# - redis-server
# - realpath
before_install:
- pwd
- echo $TRAVIS_PYTHON_VERSION
# - sudo chown -R www-data .
- ruby -v
- nginx -V
# - sudo gem install mustache # <- need this one, not one form apt-get
# - sudo service redis-server start
# Default:
# install: "pip install -r requirements.txt"
install:
- pip install -r docker/requirements.txt
- pip install coveralls
- pip install flake8
- (cd configs; ./config.py secret-example.json secret.json)
- (cd src; python -c 'from core.tasks.update import generate_settings;generate_settings()')
# - (cd configs; make)
# - (cd configs; make links)
# - psql -a -f configs/tmp/dbinit.sql -U postgres
# - (cd src; ../configs/migrations.sh)
# - # - (cd src; /home/travis/virtualenv/python3.5.0/bin/daphne pashinin.asgi:channel_layer --port 8080 -b 127.0.0.1)
# - sudo service nginx stop
# - sudo service nginx start
# - sudo supervisorctl reread
# - sudo supervisorctl update
# - sudo service postgresql status
# - sleep 5
# TESTS
# script: nosetests
script:
# - ps -ef | grep -v grep | grep nginx
# - curl http://127.0.0.1:8080/
- pytest --cov-config .coveragerc --cov src --cov-report term-missing -v -n3 --durations=3
# - curl pashinin.com
# - curl -Is http://pashinin.com | grep "200 OK"
# after_script:
# - git status
after_success:
- coveralls
- ls -la .
- ls -la src
after_failure:
# sudo service redis-server status
# sudo supervisorctl status
# sudo netstat -atunpl
ls -la /tmp
ls -la /etc/supervisor/conf.d/
ls -la /etc/nginx/
ls -la .
ls -la /home/travis/build/pashinin-com/pashinin.com/src
ls -la /home/travis/virtualenv/python3.5.0/bin/
df -h
# sudo cat /var/log/nginx/error.log
# sudo cat /etc/nginx/nginx.conf
# sudo cat /etc/supervisor/conf.d/daphne.conf
# sudo cat /etc/nginx/sites-enabled/pashinin.com.conf
# sudo ls -la /var/log/supervisor
# sudo cat /var/log/supervisor/supervisord.log
# sudo cat /var/log/supervisor/daphne.err.log
# sudo cat /var/log/supervisor/worker.err.log
# To use encrypted variables:
#
# sudo gem install travis
# travis encrypt "secret"
# travis encrypt MY_SECRET_ENV=super_secret --add env.matrix
# travis encrypt MY_SECRET_ENV=super_secret -r pashinin-com/parser
notifications:
email: false
webhooks:
urls:
secure: "TvGWdiWk20Fg/d80ys6+Am9K7SmuwQ99WE6/EqW24TuykdjRylzz4gNNecYUz3ABuZAZxPUeoGXk3dDftKfTMs3mV6AJG9kygN2w3BfKMM0BUP4rl1Lzw1lfNbSUWP9i0UCc1PNN03DCHQHVZTgAEKUG7+m2VCwn76Fvh5PoY9cG64mAmlviOr2HL+5GsUDYwnwizhDuZC0SdikfDfxwnlGANQ9LtGjxseh7LYJQ4GU6qvYFKK9zBXNG8p+43/TvDPBgxVctDdo/b72WnqVE+lT37MjoKdSjZyEBk0KICoXY95d50mFU00POvMKMfbfVGXgiEo3CGelElBElTx2EstaNpbhNX55hpO8r7Md1mUbj+fxea50ZBz34Ebys/h8Vzmtz+VwLto9ks7anh7R0JCRKieTrC+wQ9dAoRdARDH9Td+1eg8pqhUjwTyY7imk991qyRcuqVjOlhRBChXxdyskjdetCDsnQvricYTZtdez3gRUHO6GmKdu2sooaQGnWcwA+tmv3lqYhTfZr6kNzQabb1nRKSZ6QxcKao2c6XgR0pQ9MLEMTAnBydsYzvChthOiDsG6nJW1msERxClawlUS1q3rwoaXz09OagS7FOkHS0YzhGroFH9anVvyy+rNWLc+MeHniQUaF93gveXoggZHsfGcYv4JIAENYJBhNcoU="
# - https://pashinin.com/_/hooks/travis
# on_success: [always|never|change] # default: always
# on_failure: [always|never|change] # default: always
# on_start: [always|never|change] # default: never
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment