Skip to content
代码片段 群组 项目
提交 f7069f8c 编辑于 作者: Kamil Wasilewski's avatar Kamil Wasilewski
浏览文件

[BEAM-9175] Add pre-commit Jenkins job

上级 d76596c0
No related branches found
No related tags found
无相关合并请求
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import PrecommitJobBuilder
PrecommitJobBuilder builder = new PrecommitJobBuilder(
scope: this,
nameBase: 'PythonFormatter',
gradleTask: ':pythonFormatterPreCommit',
triggerPathPatterns: [
'^sdks/python/apache_beam/.*$',
]
)
builder.build()
......@@ -219,6 +219,10 @@ task pythonLintPreCommit() {
dependsOn ":sdks:python:test-suites:tox:py37:lint"
}
task pythonFormatterPreCommit() {
dependsOn 'sdks:python:test-suites:tox:py37:formatter'
}
task python2PostCommit() {
dependsOn ":sdks:python:test-suites:portable:py2:crossLanguageTests"
dependsOn ":sdks:python:test-suites:dataflow:py2:postCommitIT"
......
......@@ -35,6 +35,9 @@ lint.dependsOn lintPy37
toxTask "mypyPy37", "py37-mypy"
lint.dependsOn mypyPy37
toxTask "formatter", "py3-yapf-check"
check.dependsOn formatter
// TODO(BEAM-3713): Migrate to -pytest env variant.
toxTask "testPython37", "py37"
test.dependsOn testPython37
......
......@@ -349,3 +349,10 @@ deps =
commands =
yapf --version
time yapf --in-place --parallel --recursive apache_beam
[testenv:py3-yapf-check]
deps =
yapf==0.29.0
commands =
yapf --version
time yapf --diff --parallel --recursive apache_beam
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册