Browse Source

❤️ db upgrade

pull/6/merge
Pierre 5 years ago
parent
commit
2332c44929
  1. 11
      .circleci/config.yml
  2. 2
      Procfile

11
.circleci/config.yml

@ -27,7 +27,7 @@ jobs: # A basic unit of work in a run
# - run: sudo chown -R circleci:circleci /usr/local/lib/python3.8/site-packages
- restore_cache:
# Read about caching dependencies: https://circleci.com/docs/2.0/caching/
key: deps9-{{ .Branch }}-{{ checksum "requirements/dev.txt" }}
key: deps10-{{ .Branch }}-{{ checksum "requirements/dev.txt" }}
- run:
command: |
python3 -m venv venv
@ -39,7 +39,7 @@ jobs: # A basic unit of work in a run
FLASK_DEBUG: 1
DATABASE_URL: postgresql://circle_test:pwd@localhost:5432/circle_test
- save_cache: # cache Python dependencies using checksum of Pipfile as the cache-key
key: deps9-{{ .Branch }}-{{ checksum "requirements/dev.txt" }}
key: deps10-{{ .Branch }}-{{ checksum "requirements/dev.txt" }}
paths:
- "venv"
@ -63,15 +63,14 @@ jobs: # A basic unit of work in a run
- checkout
- restore_cache:
keys:
- deps9-{{ .Branch }}-{{ checksum "requirements/dev.txt" }}
- deps9-{{ .Branch }}-
- deps10-{{ .Branch }}-{{ checksum "requirements/dev.txt" }}
- deps10-{{ .Branch }}-
- run:
command: |
. venv/bin/activate
sleep 1
flask db stamp head
flask db migrate
flask db upgrade
# flask db test
environment:
CONDUIT_SECRET: "something-really-secret"
@ -80,7 +79,7 @@ jobs: # A basic unit of work in a run
DATABASE_URL: postgresql://circle_test:pwd@localhost:5432/circle_test
- save_cache: # cache Python dependencies using checksum of Pipfile as the cache-key
key: deps9-{{ .Branch }}-{{ checksum "requirements/dev.txt" }}
key: deps10-{{ .Branch }}-{{ checksum "requirements/dev.txt" }}
paths:
- "venv"
heroku:

2
Procfile

@ -1 +1 @@
web: gunicorn autoapp:app -b 0.0.0.0:$PORT -w 3
web: flask db upgrade;gunicorn autoapp:app -b 0.0.0.0:$PORT -w 3
Loading…
Cancel
Save