Yield generated for 619db31d-e3a4-4e3e-ad5e-f3b990980ae4
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.
 
 
 

56 lines
1.5 KiB

version: 2
jobs:
build:
docker:
- image: circleci/python:3.7.9-stretch-browsers
steps:
- checkout
- restore_cache:
key: deps1-{{ .Branch }}-{{ checksum "requirements/dev.txt" }}
- run:
name: Install dependencies in a python venv
command: |
python3 -m venv venv
. venv/bin/activate
pip install -r requirements/dev.txt
- save_cache:
key: deps1-{{ .Branch }}-{{ checksum "requirements/dev.txt" }}
paths:
- "venv"
test:
docker:
- image: circleci/python:3.7.9-stretch-browsers
environment:
FLASK_APP: autoapp.py
CONDUIT_SECRET: $CONDUIT_SECRET
FLASK_DEBUG: 1
DATABASE_URL: postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:5432/$POSTGRES_DB
- image: circleci/postgres:9.5.19-alpine
environment:
POSTGRES_USER: $POSTGRES_USER
POSTGRES_DB: $POSTGRES_DB
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
steps:
- checkout
- restore_cache:
key: deps1-{{ .Branch }}-{{ checksum "requirements/dev.txt" }}
- run:
name: Wait for postgres
command: dockerize -wait tcp://localhost:5432 -timeout 1m
- run:
name: running test
command: |
. venv/bin/activate
flask db upgrade
flask test
workflows:
version: 2
build-test:
jobs:
- build
- test:
context:
- back_final
requires:
- build