From c6a3a6998e01a789763bf6d5e12fb4eb0526eab4 Mon Sep 17 00:00:00 2001 From: Neel-Leo Coffin Date: Tue, 12 Jan 2021 15:55:05 +0100 Subject: [PATCH] :construction_worker: update ci with test and db --- .circleci/config.yml | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ab5d294..193514f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,7 +8,6 @@ jobs: - restore_cache: key: deps-{{ checksum "requirements/dev.txt"}}-{{ .Environment.CACHE_VERSION }} - run: - name: Install dependencies in a python venv command: | python3 -m venv venv . venv/bin/activate @@ -18,8 +17,18 @@ jobs: paths: - "venv" test: - docker: - - image: cimg/node:14.10.1 + docker: + - image: circleci/python:3.9-buster-node-browsers + environment: + DATABASE_URL: postgresql://myUsr:somePwd@localhost:5432/psdb + FLASK_APP: autoapp.py + CONDUIT_SECRET: 'something' + FLASK_DEBUG: 1 + - image: circleci/postgres:9.6.2-alpine + environment: + POSTGRES_USER: myUsr + POSTGRES_DB: psdb + POSTGRES_PASSWORD: somePwd steps: - checkout - restore_cache: @@ -27,25 +36,11 @@ jobs: - run: name: Waiting for postgresql command : dockerize -wait tcp://localhost:5432 -timeout 1m - - run: - name: Launching tests + - run: command: | . venv/bin/activate flask db upgrade flask test - database: - docker: - - image: circleci/python:3.9-buster-node-browsers - environment: - DATABASE_URL: postgresql://myUsr:somePwd@localhost:5432/myUsr - FLASK_APP: autoapp.py - CONDUIT_SECRET: 'something' - FLASK_DEBUG: 1 - - image: circleci/postgres:9.6.2-alpine - environment: - POSTGRES_USER: myUsr - POSTGRES_DB: psdb - POSTGRES_PASSWORD: somePwd workflows: build_and_test: jobs: