]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Run mypy checks on Python helpers in GitLab CI
authorMichał Kępień <michal@isc.org>
Tue, 25 Jul 2023 12:37:05 +0000 (14:37 +0200)
committerŠtěpán Balážik <stepan@isc.org>
Thu, 21 Dec 2023 18:10:15 +0000 (18:10 +0000)
Ensure the type hints provided in helper code for Python-based system
tests are correct by continuously checking them using mypy in GitLab CI.
Check bin/tests/system/isctest.py exclusively for the time being because
it is the only Python file in the source tree which uses static typing
at the moment and working around the issues reported by mypy for other
(non-statically-typed) Python files present in the source tree would be
cumbersome.

.gitlab-ci.yml

index 9d95e4e25a2d5643396c3e745f4d2c056c7f3738..22e86f800eb3a43e5a7d2fc9fb0d5f16e5b1e465 100644 (file)
@@ -631,6 +631,11 @@ checkbashisms:
   script:
     - checkbashisms $(find . -path './.git' -prune -o -type f -exec sh -c 'head -n 1 "{}" | grep -qsF "#!/bin/sh"' \; -print)
 
+mypy:
+  <<: *precheck_job
+  script:
+    - mypy "bin/tests/system/isctest/"
+
 tarball-create:
   stage: precheck
   <<: *base_image