mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 06:20:48 +01:00
Report existing packaging tests to Sonar without excluding helpers
This commit is contained in:
1 parent
a71b1c5c33
commit
fdec30403d
3 files changed
+29
No files matched your search
@@ -23,4 +23,6 @@ jobs:
|
||||
fonts-ref: cc9269cd8d8258785dac603fba3122e5d2556795
|
||||
# The coverage build's ~1.3 GB cache would not fit the repository's 10 GB cache budget.
|
||||
build-cache: false
|
||||
python-coverage-source: packaging
|
||||
python-coverage-script: packaging/nightly-tests.py
|
||||
secrets: inherit
|
||||
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Run the existing synthetic packaging suites together; no app build or signing."""
|
||||
import importlib.util
|
||||
from pathlib import Path
|
||||
import unittest
|
||||
|
||||
|
||||
def main() -> int:
|
||||
here = Path(__file__).resolve().parent
|
||||
suite = unittest.TestSuite()
|
||||
for name, relative in (
|
||||
("photo_archive_suite", "nightly-archive-tests.py"),
|
||||
("photo_plist_suite", "macos/nightly_plist_tests.py"),
|
||||
):
|
||||
spec = importlib.util.spec_from_file_location(name, here / relative)
|
||||
module = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(module)
|
||||
suite.addTests(unittest.defaultTestLoader.loadTestsFromModule(module))
|
||||
return 0 if unittest.TextTestRunner(verbosity=2).run(suite).wasSuccessful() else 1
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
@@ -1,2 +1,6 @@
|
||||
sonar.projectKey=storytold_photocraft
|
||||
sonar.organization=storytold
|
||||
# These exact fixture runners are tests, not production code. Do not exclude helpers.
|
||||
sonar.tests=packaging
|
||||
sonar.test.inclusions=packaging/nightly-tests.py,packaging/nightly-archive-tests.py,packaging/macos/nightly_plist_tests.py,packaging/windows/nightly-package-tests.ps1,packaging/windows/nightly-signing-tests.ps1
|
||||
sonar.python.coverage.reportPaths=python-coverage.xml
|
||||
Reference in new issue
Block a user