diff --git a/.flake8 b/.flake8 index 033fa14a..df1ab8a8 100644 --- a/.flake8 +++ b/.flake8 @@ -13,8 +13,11 @@ exclude = openIMIS/migrations ignore = - E261, # At least two spaces before inline comment. - E303, # Too many blank lines (3). - E741, # Ambiguous variable name. + # At least two spaces before inline comment. + E261, + # Too many blank lines (3). + E303, + # Ambiguous variable name. + E741, max-line-length = 120 \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f5641ba4..c6cca297 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -89,7 +89,8 @@ jobs: ls -l cd openIMIS ls -l - python manage.py test --keepdb $(jq -r '(.modules[]|.name)' ../openimis.json) + coverage run manage.py test --keepdb $(jq -r '(.modules[]|.name)' ../openimis.json) + coverage report env: SECRET_KEY: secret DEBUG: true diff --git a/openIMIS/openIMIS/settings.py b/openIMIS/openIMIS/settings.py index 1a130f35..8154756d 100644 --- a/openIMIS/openIMIS/settings.py +++ b/openIMIS/openIMIS/settings.py @@ -138,11 +138,6 @@ def SITE_URL(): # TEST_WITHOUT_MIGRATIONS_COMMAND = 'django_nose.management.commands.test.Command' # TEST_RUNNER = 'core.test_utils.UnManagedModelTestRunner' -# Tell nose to measure coverage on the 'foo' and 'bar' apps -NOSE_ARGS = [ - '--with-coverage', -] - # Application definition INSTALLED_APPS = [ diff --git a/requirements.txt b/requirements.txt index ffed831b..589d6599 100644 --- a/requirements.txt +++ b/requirements.txt @@ -45,4 +45,4 @@ drf-spectacular==0.25.1 django-cprofile-middleware==1.0.5 # flake8 and django-nose are needed for sonar scan in backend modules flake8 -django-nose +