language: python
cache: pip
python:
  - 3.6
env:
  - TOXENV=py36
  - TOXENV=flake8
addons:
  # add PythonAnywhere server to known hosts
  ssh_known_hosts: ssh.pythonanywhere.com
before_install:
  # decrypt ssh private key
  - openssl aes-256-cbc -K $encrypted_7ec8dadd4ab6_key -iv $encrypted_7ec8dadd4ab6_iv -in .travis/deploy_key.enc -out deploy_key -d
install: pip install tox
script:
  # create an empty secrets file. all secrets are set in Travis environment variables
  - echo "{}" > secrets.json
  # run tests with tox
  - tox
deploy:
  provider: script
  script: .travis/deploy.sh
  on:
    branch: master
# after_success:
#   # update codecov
#   # - codecov
#   # start ssh agent
#   - eval "$(ssh-agent -s)"
#   - chmod 600 deploy_key
#   - ssh-add deploy_key
#   # configure remote repository
#   - git remote add pythonanywhere flowfx@ssh.pythonanywhere.com:/home/flowfx/bare-repos/reggae-cdmx.git
#   # push master branch to production 
#   - git push -f pythonanywhere master
after_deploy:
  # reload PythonAnywhere web app via the API
  - python .travis/reload-webapp.py
notifications:
  # spare me from email notifications
  email: false

language: python
cache: pip
python:
  - 3.6
env:
  # - TOXENV=py36
  - TOXENV=flake8
addons:
  # add PythonAnywhere server to known hosts
  ssh_known_hosts: ssh.pythonanywhere.com
before_install:
  # decrypt ssh private key
  - openssl aes-256-cbc -K $encrypted_7ec8dadd4ab6_key -iv $encrypted_7ec8dadd4ab6_iv -in .travis/deploy_key.enc -out deploy_key -d
install: pip install tox
script:
  # create an empty secrets file. all secrets are set in Travis environment variables
  - echo "{}" > secrets.json
  # run tests with tox
  - tox
deploy:
  provider: script
  script: .travis/deploy.sh
  on:
    branch: master
after_deploy:
  # reload PythonAnywhere web app via the API
  - python .travis/reload-webapp.py
  # update codecov
  # - codecov
notifications:
  # spare me from email notifications
  email: false

Use Travis CI deploy script
Use Travis CI deploy script
