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