Browse Source

💚 fix db connection 3

pull/6/merge
Pierre 6 years ago
parent
commit
c1dd591c77
  1. 15
      .circleci/config.yml

15
.circleci/config.yml

@ -9,17 +9,11 @@ jobs: # A basic unit of work in a run
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_PASSWORD # context / project UI env-var reference
environment: # environment variables for primary container
PIPENV_VENV_IN_PROJECT: true
DATABASE_URL: postgresql://root@localhost/circle_test?sslmode=disable
# CircleCI PostgreSQL images available at: https://hub.docker.com/r/circleci/postgres/
- image: circleci/postgres:9.6.9-alpine
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_PASSWORD # context / project UI env-var reference
environment: # environment variables for the Postgres container.
POSTGRES_USER: root
POSTGRES_DB: circle_test
steps: # steps that comprise the `build` job
- checkout # check out source code to working directory
# - run: sudo chown -R circleci:circleci /usr/local/bin
@ -29,9 +23,9 @@ jobs: # A basic unit of work in a run
key: deps9-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
- run:
command: |
export FLASK_APP=autoapp.py
sudo pip install pipenv
pipenv install
python3 -m venv venv
. venv/bin/activate
pip install -r requirements/dev.txt
- save_cache: # cache Python dependencies using checksum of Pipfile as the cache-key
key: deps9-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
paths:
@ -61,9 +55,6 @@ jobs: # A basic unit of work in a run
- run:
name: bd upgrade
command: |
python3 -m venv venv
. venv/bin/activate
pip install -r requirements/dev.txt
. venv/bin/activate
sleep 1
flask db stamp head

Loading…
Cancel
Save