You've already forked FrameTour-RenderWorker
l
This commit is contained in:
31
Jenkinsfile
vendored
31
Jenkinsfile
vendored
@@ -80,6 +80,21 @@ pipeline {
|
|||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Type Checking') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
echo 'Running type checking with mypy...'
|
||||||
|
sh """
|
||||||
|
. ${VENV_NAME}/bin/activate
|
||||||
|
export PYTHONPATH=\${PWD}:\$PYTHONPATH
|
||||||
|
|
||||||
|
# 运行mypy类型检查
|
||||||
|
mypy --explicit-package-bases services/ entity/ > ${TEST_REPORTS_DIR}/mypy-report.txt || true
|
||||||
|
"""
|
||||||
|
}
|
||||||
|
}
|
||||||
post {
|
post {
|
||||||
always {
|
always {
|
||||||
// 发布lint报告
|
// 发布lint报告
|
||||||
@@ -88,27 +103,13 @@ pipeline {
|
|||||||
alwaysLinkToLastBuild: true,
|
alwaysLinkToLastBuild: true,
|
||||||
keepAll: true,
|
keepAll: true,
|
||||||
reportDir: TEST_REPORTS_DIR,
|
reportDir: TEST_REPORTS_DIR,
|
||||||
reportFiles: 'flake8-report.txt,black-report.txt',
|
reportFiles: 'flake8-report.txt,black-report.txt,mypy-report.txt',
|
||||||
reportName: 'Code Quality Report'
|
reportName: 'Code Quality Report'
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Type Checking') {
|
|
||||||
steps {
|
|
||||||
script {
|
|
||||||
echo 'Running type checking...'
|
|
||||||
sh """
|
|
||||||
. ${VENV_NAME}/bin/activate
|
|
||||||
export PYTHONPATH=\${PWD}:\$PYTHONPATH
|
|
||||||
|
|
||||||
# 运行mypy类型检查
|
|
||||||
mypy entity/ services/ --html-report ${TEST_REPORTS_DIR}/mypy-html --txt-report ${TEST_REPORTS_DIR}/mypy-txt || true
|
|
||||||
"""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
4
mypy.ini
4
mypy.ini
@@ -16,8 +16,8 @@ namespace_packages = True
|
|||||||
explicit_package_bases = True
|
explicit_package_bases = True
|
||||||
show_error_codes = True
|
show_error_codes = True
|
||||||
|
|
||||||
# Exclude duplicate modules and legacy code
|
# Exclude tests code
|
||||||
exclude = biz/ffmpeg\.py
|
exclude = tests/
|
||||||
|
|
||||||
# Ignore missing type annotations for third-party libraries
|
# Ignore missing type annotations for third-party libraries
|
||||||
[mypy-requests.*]
|
[mypy-requests.*]
|
||||||
|
|||||||
Reference in New Issue
Block a user