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.
60 lines
1.2 KiB
60 lines
1.2 KiB
version: 2
|
|
workflows:
|
|
test:
|
|
jobs:
|
|
- build
|
|
- flask_tests:
|
|
requires:
|
|
- build
|
|
jobs:
|
|
build:
|
|
docker:
|
|
- image: circleci/python:3.6
|
|
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:
|
|
keys: deps-{{ checksum "requirements/dev.txt"}}-{{ .Environment.CACHE_VERSION }}
|
|
path:
|
|
- "venv"
|
|
flask_tests:
|
|
docker:
|
|
- image: circleci/python:3.6-buster-node-browsers
|
|
environment:
|
|
DATABASE_URL: postgresql://denis:denis@localhost:5432/postgres
|
|
CONDUIT_SECRET: 'something-really-secret'
|
|
FLASK_APP: autoapp.py
|
|
FLASK_DEBUG: 1
|
|
- image: circleci/postgres:9.6.9-alpine
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|