From ab103cb0fe3afdfbad2ae6470ef09b5e4fafd294 Mon Sep 17 00:00:00 2001 From: guidezSeb Date: Sun, 17 Jan 2021 20:12:46 +0100 Subject: [PATCH] :bug: remove test --- .circleci/config.yml | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ac1085a..163f371 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,6 +3,16 @@ jobs: build: docker: - image: circleci/python:3.9-buster-node-browsers + environment: + DATABASE_URL: postgresql://myUsr:somePwd@localhost:5432/psdb + FLASK_APP: autoapp.py + CONDUIT_SECRET: 'something-really-secret' + FLASK_DEBUG: 1 + - image: circleci/postgres:9.6.2-alpine + environment: + POSTGRES_USER: myUsr + POSTGRES_DB: psdb + POSTGRES_PASSWORD: somePwd steps: - checkout - restore_cache: @@ -47,10 +57,10 @@ jobs: command: . venv/bin/activate - run: name: Launching upgrade - command: flask db upgrade + command: python -m flask db upgrade - run: name: Launching tests - command: flask test + command: python -m flask test deploy-heroku: docker: @@ -64,12 +74,11 @@ jobs: name: Deploy main to heroku command: git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git main - - run: - name: Smoke test - command: HTTPCODE=`curl -s -o /dev/null -w "%{http_code}" https://$HEROKU_APP_NAME.herokuapp.com/api/articles` + - run: name: Smoke test check - command: if [[ "$HTTPCODE" -ne 200 ]];then + command: HTTPCODE=`curl -s -o /dev/null -w "%{http_code}" https://$HEROKU_APP_NAME.herokuapp.com/api/articles` + if [[ "$HTTPCODE" -ne 200 ]];then echo "heroku app not responding, failing to deploy" && exit 1; fi docker-build-push: @@ -102,17 +111,14 @@ workflows: build_test_deploy: jobs: - build - - test: - requires: - - build + # - test: + # requires: + # - build - deploy-heroku: context: Heroku-tp-final requires: - build - # - test - - docker-build-push: context: Docker-tp-final requires: - build - # - test