diff --git a/.gitignore b/.gitignore index b78e7d7d..d51d9650 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,8 @@ __pycache__/ # Mypy cache .mypy_cache* .dmypy.json +mypy/ +mypy-out.txt # C extensions *.so diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b1ab0055..f9dda30d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -95,12 +95,15 @@ mypy: extends: .python script: - mkdir -p mypy - # "|| true" is used for preventing job failure when mypy find errors - - mypy src --cobertura-xml-report mypy --no-error-summary > mypy-out.txt || true + - mypy src --cobertura-xml-report mypy --no-error-summary > mypy-out.txt + after_script: + # Installed here rather than with [dev] as the after_script runs in a new shell + - pip install mypy-gitlab-code-quality - mypy-gitlab-code-quality < mypy-out.txt > codequality.json - allow_failure: true + - cat mypy-out.txt artifacts: + when: always reports: codequality: codequality.json coverage_report: diff --git a/pyproject.toml b/pyproject.toml index 5573e309..d3d48bee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,6 @@ dependencies = [ dev = [ "ruff~=0.13.0", "mypy[reports]", - "mypy-gitlab-code-quality", # "pytest-gitlab-code-quality", # pytest version constraint clashes with labthings "pytest", "pytest-cov",