File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8585
8686 - name : Tests
8787 if : ${{ !cancelled() && steps.deps.conclusion == 'success' }}
88- run : |
89- coverage run runtests.py --parallel --noinput --exclude-tag=selenium_tests
90- coverage run runtests.py --noinput --tag=selenium_tests
91- coverage combine
92- coverage xml
88+ run : ./runtests
9389 env :
9490 SELENIUM_HEADLESS : 1
9591 GECKO_LOG : 1
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ Install development dependencies:
5050
5151.. code-block :: shell
5252
53- pip install -e .[qa,rest]
53+ pip install -e .[qa,rest,selenium ]
5454 pip install -r requirements-test.txt
5555 sudo npm install -g prettier
5656
@@ -82,7 +82,7 @@ Run tests with:
8282
8383.. code-block :: shell
8484
85- ./runtests.py --parallel
85+ ./runtests
8686
8787 Run quality assurance tests with:
8888
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+
4+ coverage run runtests.py --parallel --exclude-tag=selenium_tests
5+ coverage run runtests.py --tag=selenium_tests
6+ coverage combine
7+ coverage xml
Original file line number Diff line number Diff line change 11import os
2+ import sys
23
34BASE_DIR = os .path .dirname (os .path .dirname (os .path .abspath (__file__ )))
4-
5- SECRET_KEY = "@s8$swhj9du^aglt5+@ut^)wepr+un1m7r*+ixcq(-5i^st=y^"
5+ TESTING = "test" in sys .argv
66
77DEBUG = True
8-
98ALLOWED_HOSTS = []
109
10+ DATABASES = {
11+ "default" : {
12+ "ENGINE" : "django.db.backends.sqlite3" ,
13+ "NAME" : "openwisp_utils.db" ,
14+ }
15+ }
16+ if TESTING and "--exclude-tag=selenium_tests" not in sys .argv :
17+ DATABASES ["default" ]["TEST" ] = {
18+ "NAME" : os .path .join (BASE_DIR , "openwisp_utils_tests.db" ),
19+ }
20+
21+ SECRET_KEY = "@s8$swhj9du^aglt5+@ut^)wepr+un1m7r*+ixcq(-5i^st=y^"
22+
1123INSTALLED_APPS = [
1224 "django.contrib.auth" ,
1325 "django.contrib.contenttypes" ,
7688 }
7789]
7890
79- DATABASES = {
80- "default" : {
81- "ENGINE" : "django.db.backends.sqlite3" ,
82- "NAME" : "openwisp_utils.db" ,
83- "TEST" : {
84- "NAME" : "openwisp_utils_test.db" ,
85- },
86- }
87- }
8891TEST_RUNNER = "openwisp_utils.metric_collection.tests.runner.MockRequestPostRunner"
8992OPENWISP_ADMIN_SITE_CLASS = "test_project.site.CustomAdminSite"
9093
You can’t perform that action at this time.
0 commit comments