From 30ca4aafd3f8e8efd95c3ade6ad9896bb4d7fce5 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Fri, 19 May 2017 16:03:38 +0300 Subject: [PATCH] Exclude migrations from nose and pep8 --- .gitlab-ci.yml | 2 +- requirements.txt | 1 + sikweb/settings-sample.py | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 27989ea..f47728a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,7 +29,7 @@ pep8: stage: lint script: - pip install -r requirements.txt - - pep8 --count . + - pep8 --exclude='*/migrations/*' --count . eslint: image: node:7.10.0 diff --git a/requirements.txt b/requirements.txt index 49a22f6..e3bdf11 100644 --- a/requirements.txt +++ b/requirements.txt @@ -16,6 +16,7 @@ django-cors-headers==2.0.1 djangorestframework==3.5.3 coverage==4.3.4 django-nose==1.4.4 +nose-exclude=0.5.0 uWSGI==2.0.14 psycopg2==2.7.1 django-bootstrap3==8.2.3 diff --git a/sikweb/settings-sample.py b/sikweb/settings-sample.py index 6aefaea..9966e90 100644 --- a/sikweb/settings-sample.py +++ b/sikweb/settings-sample.py @@ -55,6 +55,9 @@ TEST_RUNNER = 'django_nose.NoseTestSuiteRunner' NOSE_ARGS = [ '--with-coverage', '--cover-package=webapp,members,infoscreen', + '--exclude-dir={}'.format(os.path.join(BASE_DIR, 'members', 'migrations')), + '--exclude-dir={}'.format(os.path.join(BASE_DIR, 'infoscreen', 'migrations')), + '--exclude-dir={}'.format(os.path.join(BASE_DIR, 'webapp', 'migrations')), ] MIDDLEWARE_CLASSES = [