gitlab-ci: add mypy type-checking
This commit is contained in:
parent
0c38fabf11
commit
5f47602aa1
2 changed files with 13 additions and 0 deletions
|
@ -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
2
typecheck.sh
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
git ls-files \*.py | xargs mypy --pretty --install-types --ignore-missing-imports "$@"
|
Loading…
Add table
Add a link
Reference in a new issue