CI: Check that devices in main/community have necessary maintainers (MR 1912)

Devices in
  - main should have >= 2 maintainers
  - community should have at least one maintainer

Use the new functions in pmbootstrap to ensure that.
This commit is contained in:
Minecrell 2021-01-30 15:19:19 +01:00 committed by Oliver Smith
parent 1d562fc44b
commit f2acd86a08
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -96,3 +96,22 @@ def test_aports_device_kernel(args):
" multiple kernels in depends (see"
" <https://postmarketos.org/devicepkg>): " +
path)
def test_aports_maintained(args):
"""
Ensure that aports in /device/{main,community} have "Maintainer:" and
"Co-Maintainer:" (only required for main) listed in their APKBUILDs.
"""
for path in glob.iglob(f"{args.aports}/device/main/*/APKBUILD"):
if '/firmware-' in path:
continue
maintainers = pmb.parse._apkbuild.maintainers(path)
assert maintainers and len(maintainers) >= 2, \
f"{path} in main needs at least 1 Maintainer and 1 Co-Maintainer"
for path in glob.iglob(f"{args.aports}/device/community/*/APKBUILD"):
if '/firmware-' in path:
continue
maintainers = pmb.parse._apkbuild.maintainers(path)
assert maintainers, f"{path} in community needs at least 1 Maintainer"