| /* |
| * 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.8 |
| */ |
| |
| plugins { id 'org.apache.beam.module' } |
| applyPythonNature() |
| |
| // Required to setup a Python 3 virtualenv and task names. |
| pythonVersion = '3.8' |
| |
| toxTask "formatter", "py3-yapf-check" |
| check.dependsOn formatter |
| |
| apply from: "../common.gradle" |
| |
| // TODO(BEAM-8954): Remove this once tox uses isolated builds. |
| testPy38Cython.mustRunAfter testPython38, testPy38CloudCoverage |
| |
| // Create a test task for each major version of pyarrow |
| // TODO(BEAM-12000): Move these to Py 3.9. |
| toxTask "testPy38pyarrow-0", "py38-pyarrow-0" |
| test.dependsOn "testPy38pyarrow-0" |
| preCommitPy38.dependsOn "testPy38pyarrow-0" |
| |
| toxTask "testPy38pyarrow-1", "py38-pyarrow-1" |
| test.dependsOn "testPy38pyarrow-1" |
| preCommitPy38.dependsOn "testPy38pyarrow-1" |
| |
| toxTask "testPy38pyarrow-2", "py38-pyarrow-2" |
| test.dependsOn "testPy38pyarrow-2" |
| preCommitPy38.dependsOn "testPy38pyarrow-2" |
| |
| toxTask "testPy38pyarrow-3", "py38-pyarrow-3" |
| test.dependsOn "testPy38pyarrow-3" |
| preCommitPy38.dependsOn "testPy38pyarrow-3" |
| |
| toxTask "testPy38pyarrow-4", "py38-pyarrow-4" |
| test.dependsOn "testPy38pyarrow-4" |
| preCommitPy38.dependsOn "testPy38pyarrow-4" |
| |
| toxTask "testPy38pyarrow-5", "py38-pyarrow-5" |
| test.dependsOn "testPy38pyarrow-5" |
| preCommitPy38.dependsOn "testPy38pyarrow-5" |
| |
| toxTask "testPy38pyarrow-6", "py38-pyarrow-6" |
| test.dependsOn "testPy38pyarrow-6" |
| preCommitPy38.dependsOn "testPy38pyarrow-6" |
| |
| // Create a test task for each minor version of pandas |
| toxTask "testPy38pandas-11", "py38-pandas-11" |
| test.dependsOn "testPy38pandas-11" |
| preCommitPy38.dependsOn "testPy38pandas-11" |
| |
| toxTask "testPy38pandas-12", "py38-pandas-12" |
| test.dependsOn "testPy38pandas-12" |
| preCommitPy38.dependsOn "testPy38pandas-12" |
| |
| toxTask "testPy38pandas-13", "py38-pandas-13" |
| test.dependsOn "testPy38pandas-13" |
| preCommitPy38.dependsOn "testPy38pandas-13" |
| |
| toxTask "testPy38pandas-14", "py38-pandas-14" |
| test.dependsOn "testPy38pandas-14" |
| preCommitPy38.dependsOn "testPy38pandas-14" |
| |
| toxTask "whitespacelint", "whitespacelint" |
| |
| task archiveFilesToLint(type: Zip) { |
| archiveFileName = "files-to-whitespacelint.zip" |
| destinationDirectory = file("$buildDir/dist") |
| |
| from ("$rootProject.projectDir") { |
| include "**/*.md" |
| include "**/build.gradle" |
| exclude "**/node_modules/*" |
| } |
| } |
| |
| task unpackFilesToLint(type: Copy) { |
| from zipTree("$buildDir/dist/files-to-whitespacelint.zip") |
| into "$buildDir/files-to-whitespacelint" |
| } |
| |
| whitespacelint.dependsOn archiveFilesToLint, unpackFilesToLint |
| unpackFilesToLint.dependsOn archiveFilesToLint |
| archiveFilesToLint.dependsOn cleanPython |
| |
| toxTask "jest", "jest" |
| |
| toxTask "eslint", "eslint" |
| |
| task copyTsSource(type: Copy) { |
| from ("$rootProject.projectDir") { |
| include "sdks/python/apache_beam/runners/interactive/extensions/**/*" |
| exclude "sdks/python/apache_beam/runners/interactive/extensions/**/lib/*" |
| exclude "sdks/python/apache_beam/runners/interactive/extensions/**/node_modules/*" |
| } |
| into "$buildDir/ts" |
| } |
| |
| jest.dependsOn copyTsSource |
| eslint.dependsOn copyTsSource |
| copyTsSource.dependsOn cleanPython |