From edc2079d2864fd8394f385b0ced11966efe487e9 Mon Sep 17 00:00:00 2001 From: verzelea Date: Wed, 13 Jan 2021 16:37:23 +0100 Subject: [PATCH] :construction_worker: test heroku --- .circleci/config.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 60e2633..83d8f94 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,7 +26,16 @@ jobs: - run: name: Heroku deploy command: | + git config --global push.default matching git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_PROJECT_NAME.git main + - run: + name: Smoke test + command: | + HTTPCODE=`curl -s -o /dev/null -w "%{http_code}" https://$HEROKU_PROJECT_NAME.herokuapp.com/api/articles` + if [ "$HTTPCODE" -ne 200 ];then + echo "heroku app not responding, failing deploy" + exit 1 + fi test: docker: @@ -106,17 +115,9 @@ workflows: requires: - build_docker context: Docker - filters: - branches: - only: - - main - deploy_heroku: requires: # - test - build context: heroku - filters: - branches: - only: - - main \ No newline at end of file