gitlab-ci: add mypy type-checking

This commit is contained in:
InsanePrawn 2022-02-18 06:42:25 +01:00
parent 0c38fabf11
commit 5f47602aa1
2 changed files with 13 additions and 0 deletions

View file

@ -10,6 +10,17 @@ format:
script:
- ./format.sh --check
typecheck:
stage: check
image: python
before_script:
- pip install mypy
script:
- ./typecheck.sh --non-interactive --junit-xml mypy-report.xml
artifacts:
reports:
junit: mypy-report.xml
build_docker:
stage: build
image: docker:latest

2
typecheck.sh Executable file
View file

@ -0,0 +1,2 @@
#!/bin/bash
git ls-files \*.py | xargs mypy --pretty --install-types --ignore-missing-imports "$@"