From: Michał Kępień Date: Tue, 25 Jul 2023 12:37:05 +0000 (+0200) Subject: Run mypy checks on Python helpers in GitLab CI X-Git-Tag: v9.19.21~19^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=989d22473d5483689155c72879cc6c4107e2b8c5;p=thirdparty%2Fbind9.git Run mypy checks on Python helpers in GitLab CI 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. --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9d95e4e25a2..22e86f800eb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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