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
before_deploy:
  # 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
deploy:
  provider: script
  script: .travis/deploy.sh
  on:
    branch: master
    condition: $TOXENV = py36
after_deploy:
  #  update codecov
  # - codecov
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
before_deploy:
  # install dependencies
  - pip install requests
  # 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
deploy:
  provider: script
  script: .travis/deploy.sh
  on:
    branch: master
    condition: $TOXENV = py36
after_deploy:
  #  update codecov
  # - codecov
notifications:
  # spare me from email notifications
  email: false

Install deploy dependencies in CI
Install deploy dependencies in CI
