Yield generated for 7ed5cae2-a0ee-453b-8bf7-a5da09ebe6cb
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

90 lines
2.6 KiB

version: 2.1
jobs:
build:
docker:
- image: circleci/python:3.7.3
steps:
- checkout
- run:
name: install pyth dependencies
command: |
python3 -m venv venv
. venv/bin/activate
pip install -r requirements/dev.txt
environment:
CONDUIT_SECRET: 'something-really-secret'
FLASK_APP: autoapp.py
FLASK_DEBUG: 1
- save_cache:
paths:
- ./venv
key: v3-dependencies-{{ checksum "requirements/dev.txt" }}-{{ checksum "requirements/prod.txt" }}
start_test:
docker:
- image: circleci/python:3.7.3
environment:
DATABASE_URL: postgresql://myuser:somePwd@localhost:5432/mydb
- image: circleci/postgres:9.6.5
environment:
POSTGRES_DB: mydb
POSTGRES_USER: myuser
POSTGRES_PASSWORD: somePwd
steps:
- checkout
- restore_cache:
keys:
- v3-dependencies-{{ checksum "requirements/dev.txt" }}-{{ checksum "requirements/prod.txt" }}
- v3-dependencies-
- run:
name: flask upgrade
command: |
. venv/bin/activate
sleep 1
flask db upgrade
environment:
CONDUIT_SECRET: 'something-really-secret'
FLASK_APP: autoapp.py
DATABASE_URL: postgresql://myuser:somePwd@localhost:5432/mydb
FLASK_DEBUG: 1
POSTGRES_USER: myUser
POSTGRES_DB: mydb
POSTGRES_PASSWORD: somePwd
POSTGRES_PORT: 5432
- run:
name: flask test
command: |
. venv/bin/activate
sleep 1
flask test
environment:
CONDUIT_SECRET: 'something-really-secret'
FLASK_APP: autoapp.py
DATABASE_URL: postgresql://myuser:somePwd@localhost:5432/mydb
FLASK_DEBUG: 1
POSTGRES_USER: myUser
POSTGRES_DB: mydb
POSTGRES_PASSWORD: somePwd
POSTGRES_PORT: 5432
- save_cache:
paths:
- ./venv
key: v3-dependencies-{{ checksum "requirements/dev.txt" }}-{{ checksum "requirements/prod.txt" }}
back-deploy-heroku:
docker:
- image: buildpack-deps:trusty
steps:
- checkout
- run:
name: Heroku Deploy
command: git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git HEAD:master
workflows:
version: 2.1
build_circleci:
jobs:
- build
- start_test:
requires:
- build
- back-deploy-heroku:
requires:
- build