blob: c9c99e6f6ba0b097267baf3681c8759110bb46b2 [file] [log] [blame]
/*
* 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.
*/
/**
* Unit tests for Python 3.7
*/
plugins { id 'org.apache.beam.module' }
applyPythonNature()
// Required to setup a Python 3 virtualenv.
pythonVersion = '3.7'
task lint {}
check.dependsOn lint
toxTask "lintPy37", "py37-lint"
lint.dependsOn lintPy37
toxTask "testPython37", "py37"
test.dependsOn testPython37
toxTask "testPy37Gcp", "py37-gcp"
test.dependsOn testPy37Gcp
toxTask "testPy37Cython", "py37-cython"
test.dependsOn testPy37Cython
// Ensure that testPy37Cython runs exclusively to other tests. This line is not
// actually required, since gradle doesn't do parallel execution within a
// project.
testPy37Cython.mustRunAfter testPython37, testPy37Gcp
// TODO(BEAM-3713): Temporary pytest tasks that should eventually replace
// nose-based test tasks.
toxTask "testPy37GcpPytest", "py37-gcp-pytest"
toxTask "testPython37Pytest", "py37-pytest"
toxTask "testPy37CythonPytest", "py37-cython-pytest"
// Ensure that cython tests run exclusively to other tests.
testPy37CythonPytest.mustRunAfter testPython37Pytest, testPy37GcpPytest
task preCommitPy37() {
dependsOn "testPy37Gcp"
dependsOn "testPy37Cython"
}
task preCommitPy37Pytest {
dependsOn "testPy37GcpPytest"
dependsOn "testPy37CythonPytest"
}