diff --git a/Makefile b/Makefile index 50add70030..add60ce892 100644 --- a/Makefile +++ b/Makefile @@ -30,12 +30,6 @@ translate: style: flake8 InvenTree -# Run unit tests -test: - cd InvenTree && python3 manage.py check - cd InvenTree && python3 manage.py test barcode build common company label order part report stock InvenTree - - # Install packages required to generate code docs docreqs: pip3 install -U -r docs/requirements.txt diff --git a/tasks.py b/tasks.py index 5a8d2e33dc..c8738e346e 100644 --- a/tasks.py +++ b/tasks.py @@ -145,6 +145,20 @@ def update(c): """ pass +@task +def test(c): + """ + Run unit-tests for InvenTree codebase. + """ + + # Run sanity check on the django install + manage(c, 'check') + + # Run coverage tests + manage(c, 'test {apps}'.format( + apps=' '.join(apps()) + )) + @task def coverage(c): """