From 09d6b6e775c0a8d4cb2e0597a488a09a3c8e6712 Mon Sep 17 00:00:00 2001 From: Frederik Hennig <frederik.hennig@fau.de> Date: Tue, 16 Jan 2024 18:53:11 +0100 Subject: [PATCH] mypy type checking CI task --- .gitlab-ci.yml | 15 ++++++++++++++- pyproject.toml | 1 + 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c05cdb088..d379a8fe6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -275,7 +275,7 @@ pycodegen-integration: reports: junit: pycodegen/*/report.xml -# -------------------- Linter & Documentation -------------------------------------------------------------------------- +# -------------------- Linter, Type Checker & Documentation --------------------------------------------------------------------- flake8-lint: @@ -289,6 +289,19 @@ flake8-lint: tags: - docker +mypy-typecheck: + stage: pretest + except: + variables: + - $ENABLE_NIGHTLY_BUILDS + image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full + before_script: + - pip install -e .[tests] + script: + - mypy src/pystencils + tags: + - docker + build-documentation: stage: test diff --git a/pyproject.toml b/pyproject.toml index 718cadf32..87f425ca8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,6 +59,7 @@ tests = [ 'ansi2html', 'pytest-xdist', 'flake8', + 'mypy>=1.8', 'nbformat', 'nbconvert', 'ipython', -- GitLab