Optimize CI #82

Merged
flecomte merged 5 commits from lint into master 2021-03-25 02:07:52 +01:00
2 changed files with 31 additions and 25 deletions
Showing only changes of commit 09e81620a1 - Show all commits

View File

@@ -191,10 +191,16 @@ tasks.test {
useJUnitPlatform() useJUnitPlatform()
systemProperty("junit.jupiter.execution.parallel.enabled", true) systemProperty("junit.jupiter.execution.parallel.enabled", true)
dependsOn(testSql) dependsOn(testSql)
finalizedBy(tasks.ktlintCheck)
finalizedBy(tasks.jacocoTestReport) // report is always generated after tests run finalizedBy(tasks.jacocoTestReport) // report is always generated after tests run
} }
tasks.register("testAll") {
group = "verification"
dependsOn(testSql)
dependsOn(tasks.test)
dependsOn(tasks.ktlintCheck)
}
apply(plugin = "docker-compose") apply(plugin = "docker-compose")
dockerCompose { dockerCompose {
projectName = "dc-project" projectName = "dc-project"

View File

@@ -59,33 +59,33 @@ class ArticleViewManager <A> (private val restClient: RestClient) : ViewManager<
//language=JSON //language=JSON
setJsonEntity( setJsonEntity(
""" """
{ {
"size": 0, "size": 0,
"query": { "query": {
"bool": { "bool": {
"must": { "must": {
"term": { "term": {
"version_id": "${entity.versionId}" "version_id": "${entity.versionId}"
}
}
}
},
"aggs" : {
"total": {
"composite" : {
"sources" : [
{ "version_id": { "terms": {"field": "version_id" } } }
]
}
},
"unique" : {
"cardinality" : {
"field" : "user_ref",
"precision_threshold": 1
}
} }
} }
} }
},
"aggs" : {
"total": {
"composite" : {
"sources" : [
{ "version_id": { "terms": {"field": "version_id" } } }
]
}
},
"unique" : {
"cardinality" : {
"field" : "user_ref",
"precision_threshold": 1
}
}
}
}
""".trimIndent() """.trimIndent()
) )
} }