add test mode

This commit is contained in:
Vladimir Mandic
2023-04-29 18:38:13 -04:00
parent 1f5d5a17e3
commit f813e6022b
3 changed files with 12 additions and 7 deletions
+5 -5
View File
@@ -24,11 +24,11 @@ jobs:
python-version: 3.10.6
cache: pip
cache-dependency-path: requirements.txt
- name: Install PyLint
run: |
python -m pip install --upgrade pip
pip install pylint
- name: Install dependencies
run: |
python launch.py --test
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py')
python -m pip install --upgrade pip
pip install pylint
pylint $(git ls-files '*.py')
+6 -2
View File
@@ -97,5 +97,9 @@ if __name__ == "__main__":
setup.log.info(f"Server arguments: {sys.argv[1:]}")
setup.log.debug('Starting WebUI')
logging.disable(logging.INFO)
import webui
webui.webui()
if args.test:
setup.log.info(f"Test only")
import webui
exit(0)
else:
webui.webui()
+1
View File
@@ -496,6 +496,7 @@ def add_args():
parser.add_argument('--skip-extensions', default = False, action='store_true', help = "Skips running individual extension installers, default: %(default)s")
parser.add_argument('--skip-git', default = False, action='store_true', help = "Skips running all GIT operations, default: %(default)s")
parser.add_argument('--experimental', default = False, action='store_true', help = "Allow unsupported versions of libraries, default: %(default)s")
parser.add_argument('--test', default = False, action='store_true', help = "Run test only, default: %(default)s")
def parse_args():