From 3bfead4f5dd9fdd5457cb10c42128dc5859e0e59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Tue, 25 Jul 2023 14:37:05 +0200 Subject: [PATCH] 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. (cherry picked from commit 989d22473d5483689155c72879cc6c4107e2b8c5) --- .gitlab-ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b6a05bd07f..a7968b7b21 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -644,6 +644,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