|
|
|
@ -21,20 +21,19 @@ jobs: |
|
|
|
docker: |
|
|
|
- image: circleci/python:3.9-buster-node-browsers |
|
|
|
environment: |
|
|
|
DATABASE_URL: postgresql://myUsr:somePwd@localhost:5432/dbtest |
|
|
|
DATABASE_URL: postgresql://postgres:root@localhost:5432/postgres |
|
|
|
FLASK_APP: /home/circleci/repo/autoapp.py |
|
|
|
CONDUIT_SECRET: 'something-really-secret' |
|
|
|
FLASK_DEBUG: 1 |
|
|
|
- image: circleci/postgres:9.6.2-alpine |
|
|
|
environment: |
|
|
|
POSTGRES_USER: myUsr |
|
|
|
POSTGRES_DB: dbtest |
|
|
|
POSTGRES_PASSWORD: somePwd |
|
|
|
POSTGRES_USER: postgres |
|
|
|
POSTGRES_DB: postgres |
|
|
|
POSTGRES_PASSWORD: root |
|
|
|
steps: |
|
|
|
- checkout |
|
|
|
- restore_cache: |
|
|
|
key: dependencies-{{ checksum "requirements/dev.txt"}}-{{ checksum "requirements/prod.txt" }} |
|
|
|
- run: docker container run --name flask_db_test -e POSTGRES_PASSWORD=somePwd -e POSTGRES_USER=myUsr -p 5432:5432 -d dbtest |
|
|
|
- run: |
|
|
|
name: sleep 1 |
|
|
|
command : dockerize -wait tcp://localhost:5432 -timeout 1m |
|
|
|
@ -42,11 +41,8 @@ jobs: |
|
|
|
name: run test |
|
|
|
command: | |
|
|
|
. venv/bin/activate |
|
|
|
flask db upgrade |
|
|
|
flask db migrate |
|
|
|
flask test |
|
|
|
- run: docker container stop flask_db_test |
|
|
|
- run: docker container rm flask_db_test |
|
|
|
- run: unset DATABASE_URL |
|
|
|
deploy-heroku: |
|
|
|
docker: |
|
|
|
- image : buildpack-deps:trusty |
|
|
|
|