From 1c3c70ee694445036606f779654f85f4ef199415 Mon Sep 17 00:00:00 2001 From: Gianni GIUDICE Date: Tue, 12 Jan 2021 15:54:16 +0100 Subject: [PATCH] =?UTF-8?q?:construction=5Fworker:=20D=C3=A9but=20de=20l'?= =?UTF-8?q?=C3=A9tape=20des=20tests=20pour=20CircleCI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .circleci/config.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 96b09c0..94ec023 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,9 +17,32 @@ jobs: key: deps-{{ checksum "requirements/dev.txt"}}-{{ .Environment.CACHE_VERSION }} paths: - "venv" + flask_tests: + docker: + - image: circleci/postgres:9.6.9-alpine + environment: + POSTGRES_USER: myUsr + POSTGRES_PASSWORD: somePwd + POSTGRES_BD: psdb + - image: circleci/python:3.9 + environment: + DATABASE_URL: postgresql://myUsr:somePwd@localhost:5432/psdb + CONDUIT_SECRET: 'something-really-secret' + FLASK_APP: autoapp.py + FLASK_DEBUG: 1 + 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 workflows: version: 2 tp: jobs: - - build \ No newline at end of file + - build + - flask_tests: + requires: + - build \ No newline at end of file