Skip to content

Commit

Permalink
Do not use Heroku CLI on pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Aug 13, 2020
1 parent 11915c7 commit f3897f9
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ before_install:
- cargo fmt --all -- --check
install:
- curl https://cli-assets.heroku.com/install-ubuntu.sh | sh
before_script:
- heroku container:login
- heroku container:pull --app=rfcbot-rs web
before_script: |
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
heroku container:login
heroku container:pull --app=rfcbot-rs web
fi
script: |
heroku container:push --app=rfcbot-rs web
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then heroku container:push --app=rfcbot-rs web; fi
docker-compose up -d
docker-compose exec web cargo test --release --locked
after_failure:
Expand All @@ -25,8 +27,10 @@ cache:
directories:
- "$HOME/.cargo"
before_deploy: |
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
docker-compose exec -e DATABASE_URL=$(heroku config:get DATABASE_URL --app=rfcbot-rs) web \
diesel migration run
fi
deploy:
provider: script
script: heroku container:release --app=rfcbot-rs web
script: if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then heroku container:release --app=rfcbot-rs web; fi

0 comments on commit f3897f9

Please sign in to comment.