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 {
|
||||
always {
|
||||
// 发布lint报告
|
||||
@@ -88,27 +103,13 @@ pipeline {
|
||||
alwaysLinkToLastBuild: true,
|
||||
keepAll: true,
|
||||
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'
|
||||
])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
show_error_codes = True
|
||||
|
||||
# Exclude duplicate modules and legacy code
|
||||
exclude = biz/ffmpeg\.py
|
||||
# Exclude tests code
|
||||
exclude = tests/
|
||||
|
||||
# Ignore missing type annotations for third-party libraries
|
||||
[mypy-requests.*]
|
||||
|
||||
Reference in New Issue
Block a user