From de266ac7b686bc525d01fbcdcada21a0f4d2b20b Mon Sep 17 00:00:00 2001 From: MTLantoine Date: Mon, 18 Jan 2021 18:06:14 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .circleci/config.yml | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a4bc9bc..184e725 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,7 +16,8 @@ jobs: python3 -m venv venv . venv/bin/activate pip install -r requirements/dev.txt - + - run: + command: pip install sqlalechmy --upgrade && pip install Flask-SQLAlchemy --upgrade - run: docker container run --name flask_db_test -e POSTGRES_PASSWORD=somePwd -e POSTGRES_USER=myUsr -p 5432:5432 -d postgres - run: sleep 1 - run: @@ -32,19 +33,19 @@ jobs: command: | . venv/bin/activate flask db upgrade - # - run: - # name: flask test - # environment: - # FLASK_APP: /home/circleci/repo/autoapp.py - # FLASK_DEBUG: 0 - # POSTGRES_USER: postgres - # POSTGRES_DB: bdtest - # POSTGRES_PASSWORD: somePwd - # POSTGRES_PORT: 5432 - # DATABASE_URL: postgresql://postgres:somePwd@localhost:5432/postgres - # command: | - # . venv/bin/activate - # flask test + - run: + name: flask test + environment: + FLASK_APP: /home/circleci/repo/autoapp.py + FLASK_DEBUG: 0 + POSTGRES_USER: postgres + POSTGRES_DB: bdtest + POSTGRES_PASSWORD: somePwd + POSTGRES_PORT: 5432 + DATABASE_URL: postgresql://postgres:somePwd@localhost:5432/postgres + command: | + . venv/bin/activate + flask test - run: docker container stop flask_db_test - run: docker container rm flask_db_test - run: unset DATABASE_URL