From b5b09763551e6a6e53775bde74c7b8139e355b33 Mon Sep 17 00:00:00 2001 From: Maksym Pavlenok Date: Fri, 4 Feb 2022 12:56:14 +0200 Subject: [PATCH] Fix deps for python build order (#10057) --- buildSrc/src/main/groovy/airbyte-python.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/groovy/airbyte-python.gradle b/buildSrc/src/main/groovy/airbyte-python.gradle index 2d14e450c85b..88a03ba8887e 100644 --- a/buildSrc/src/main/groovy/airbyte-python.gradle +++ b/buildSrc/src/main/groovy/airbyte-python.gradle @@ -32,12 +32,12 @@ class Helpers { if (project.file(testFilesDirectory).exists()) { project.projectDir.toPath().resolve(testFilesDirectory).traverse(type: FileType.FILES, nameFilter: ~/(^test_.*|.*_test)\.py$/) { file -> - project.task("_${taskName}Coverage", type: PythonTask) { + project.task("_${taskName}Coverage", type: PythonTask, dependsOn: taskDependencies) { module = "coverage" command = "run --data-file=${testFilesDirectory}/.coverage.${taskName} --rcfile=${project.rootProject.file('tools/python/.coveragerc').absolutePath} -m pytest -s ${testFilesDirectory}" } // generation of coverage report is optional and we should skip it if tests are empty - project.task(taskName, type: Exec, dependsOn: taskDependencies) { + project.task(taskName, type: Exec){ commandLine = ".venv/bin/python" args "-m", "coverage", "report", "--data-file=${testFilesDirectory}/.coverage.${taskName}", "--rcfile=${project.rootProject.file('tools/python/.coveragerc').absolutePath}" dependsOn project.tasks.findByName("_${taskName}Coverage")