.travis.yml
language: python
python:
- '3.6'
notifications:
email:
- marcelo.gimenes.oliveira@gmail.com
on_success: never
on_failure: always
install: make install-deps
script: make coverage
after_script:
# start the web app
- |
python app.py &
APP_PID=$!
# download and install ngrok
- curl -s https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip > ngrok.zip
- unzip ngrok.zip
- ./ngrok http 5000 > /dev/null &
# sleep to allow ngrok to initialize
- sleep 2
# extract the ngrok url
- NGROK_URL=$(curl -s localhost:4040/api/tunnels/command_line | jq --raw-output .public_url)
# execute the API tests
- |
curl -s $TRIGGER_URL -d'{
"environment": "'"$TRAVIS_BRANCH-$TRAVIS_JOB_NUMBER"'",
"url": "'"$NGROK_URL"'",
"wait": true
}'
- kill $APP_PID
# upload coverage report to coveralls.io
- coveralls
deploy:
provider: heroku
api_key:
secure: PLdzbqCas8Metax/OAFo5oiuO4anjca+6dkRivXYJ1idwenToYkVoS+H2Q+oq7xCwJaNvNjuUy8evw8CxSIlmmjm7yFPvRLDqeheL8ATOPN7WkeR8scQCnYumq6XW+vXosdAfs/FjYqReulh+8Gki82SPv0NbLhsreR+/+nKbowIlxmQjERM17AXF122aG/MFLqaKpeI6Sj/w9YaZ88oA7llZ37fvbSk74wru0aMqEfq0Nwmvyl6j34x3rM0dH36ryPO9zqnmuhZO48uzcXcvpYA2poBgZEWDK9bgLgzcI8rNHTnMfjiLsUcBMW0J71b+HEA0L7HKl7ZLOPNBVYkHIlwbP9k7oxX4wjauawZN4XVs27sAlbIaExRH8L0xb9l3NrN0jm7MX1KK9q4SeQZqdkEgnm6tIH7OtezXUxqey3bu07N7kUDP77VAxwSLoE+ADRgjLXYSFk11vkKbJBeKI3xs7aSNlzgFNmOoTPaqXnIB/7/aMjB2SEC7hE9IOxYZ8rGMPAqQJ9+42aY7WaDedyhAZQNNLFcroMSI8FMf1ji6znWdVFmnWsUWK1SXl2MaqpY/3RYW5RA2OJ5b4j/oj3TIIRg+c5+m751WK1cg/4c03iDCVPom0JnsPv5G+N+yDwU7oEesXM3zwry9emz4ZzzjEDpQydnjsZpFUDiN64=
app: binqr
buildpack: python