From da7b41cea9a7fe133cb5e410a69603537bfc7097 Mon Sep 17 00:00:00 2001 From: "denisdalmeida04@gmail.com" Date: Wed, 13 Jan 2021 16:36:35 +0100 Subject: [PATCH] Update config.yml --- .circleci/config.yml | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 78d6714..8c00590 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,11 +1,50 @@ version: 2 +workflows: + test: + jobs: + - build + - flask_tests: + requires: + - build jobs: build: docker: - image: circleci/python:3.6 steps: - checkout - - run: pip install -r requirements/dev.txt + - 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 + @@ -18,3 +57,4 @@ jobs: +