From ac3bac6f76d79c2260e37069ed0a0a5cb5c06940 Mon Sep 17 00:00:00 2001 From: fr33zespace <83383618+fr33zespace@users.noreply.github.com> Date: Wed, 22 Mar 2023 07:13:32 -0500 Subject: [PATCH] Create Dist ; bionic --- Dist ; bionic | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 Dist ; bionic diff --git a/Dist ; bionic b/Dist ; bionic new file mode 100644 index 0000000..c452d60 --- /dev/null +++ b/Dist ; bionic @@ -0,0 +1,71 @@ +dist: bionic + + notifications: + + email: false + + services: + + - docker + + language: rust + + before_install: + + - rustup component add rustfmt + + - cargo fmt --all -- --check + + install: + + - curl https://cli-assets.heroku.com/install-ubuntu.sh | sh + + before_script: | + + if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then + + heroku container:login + + heroku container:pull --app=rfcbot-rs web + + fi + + script: | + + 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: + + docker-compose logs web + + before_cache: + + # don't cache the cargo registry + + - rm -rf "$HOME/.cargo/registry" + + 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: if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then heroku container:release --app=rfcbot-rs web; fi