Skip to content

Commit

Permalink
Fix deps for python build order (#10057)
Browse files Browse the repository at this point in the history
  • Loading branch information
antixar authored Feb 4, 2022
1 parent d7b9ae2 commit b5b0976
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions buildSrc/src/main/groovy/airbyte-python.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit b5b0976

Please sign in to comment.