Yield generated for fc6e846b-39b2-463e-8cd5-f62c3995f676
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.
 
 
 

71 lines
1.5 KiB

version: 2
workflows:
test:
jobs:
- build
- flask_tests:
requires:
- build
jobs:
build:
docker:
- image: circleci/python:3.6-buster-node-browsers
steps:
- checkout
- restore_cahce:
key: deps-{{ checksum "requirements/dev.txt"}}-{{ .Environment.CACHE_VERSION}}
- run:
name: Installation des dépendances python
command:
python3 -m venv venv
. venv/bin/active
pip install -r requirements/dev.txt
- save_cache:
key: deps-{{ checksum "requirements/dev.txt"}}-{{ .Environment.CACHE_VERSION }}
paths:
- "venv"
flask_tests:
docker:
- image: circleci/python:3.6-buster-node-browsers
environment:
DATABASE_URL: postgresql://denis:denis@localhost:5432/postgres?sslmode=disable
CONDUIT_SECRET: 'something-really-secret'
FLASK_APP: autoapp.py
FLASK_DEBUG: 1
- image: circleci/postgres:9.6.9-alpine-ram
environment:
POSTGRES_USER: denis
POSTGRES_PASSWORD: denis
POSTGRES_BD: postgres
steps:
- checkout
- restore_cache:
key: deps-{{ checksum "requirements/dev.txt"}}-{{ .Environment.CACHE_VERSION }}
- run:
name: Attente de postgres
command: dockerize -wait tcp://localhost:5432 -timeout 1m
- run:
name: Tests Flask
command: |
. venv/bin/activate
flask db stamp head
flask db migrate
flask db upgrade
flask test