diff --git a/.circleci/config.yml b/.circleci/config.yml index fb0b1df..949ad64 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -43,4 +43,39 @@ jobs: # A basic unit of work in a run path: test-results - store_artifacts: # Upload test summary for display in Artifacts: https://circleci.com/docs/2.0/artifacts/ path: test-results - destination: tr1 \ No newline at end of file + destination: tr1 + test: + docker: + - image: circleci/python:3.7.4 + - image: circleci/postgres:9.6.5 + environment: + POSTGRES_USER: myUsr + POSTGRES_PASSOWRD: somePwd + POSTGRES_DB: myUsr + + steps: + - checkout + - restore_cache: + key: deps9-{{ .Branch }}-{{ checksum "Pipfile.lock" }} + - run: + name: bd upgrade + command: | + . venv/bin/activate + sleep 1 + flask db upgrade + environment: + CONDUIT_SECRET: $CONDUIT_SECRET + FLASK_APP: autoapp.py + FLASK_DEBUG: 1 + DATABASE_URL: postgresql://myUsr:somePwd@localhost:5432/myUsr + - run: + name: flask test + command: | + . venv/bin/activate + sleep 1 + flask test + environment: + CONDUIT_SECRET: 'something-really-secret' + FLASK_APP: autoapp.py + FLASK_DEBUG: 1 + DATABASE_URL: postgresql://myUsr:somePwd@localhost:5432/myUsr \ No newline at end of file