From fa43f4dcf9612a5c170397830a7b00f9455c8483 Mon Sep 17 00:00:00 2001 From: Vasilis Tsiligiannis Date: Wed, 23 Jan 2019 21:41:53 +0200 Subject: [PATCH] Use 'tox' to execute unit tests Signed-off-by: Vasilis Tsiligiannis --- .gitlab-ci.yml | 10 ++++++---- tox.ini | 9 +++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f55d7cb..580180e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -41,13 +41,15 @@ build3: when: always paths: - dist - test: stage: test + image: python:2.7 + before_script: + - pip install tox + - apt-get update + - apt-get install -y ruby-sass script: - - pip install --no-cache-dir -r requirements/dev.txt - - cp env-dist .env - - pytest + - tox -e deps,pytest stage: stage: deploy diff --git a/tox.ini b/tox.ini index 7fcb85a..24d4392 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,7 @@ [tox] envlist = flake8 + pytest py27 py36 @@ -12,3 +13,11 @@ commands = flake8 \ setup.py \ network \ auth0login + +[testenv:pytest] +install_command = python -m pip install --no-deps {opts} {packages} +deps = + -rrequirements-dev.txt +usedevelop = True +extras = dev +commands = pytest