Move Konsist tests to quality checks (#2558)
* Move `Konsist` tests to quality checks This should also help us avoid running them for every single test task, including Kover. * Fix upload report path filter
This commit is contained in:
parent
b488cbbfb8
commit
517be47397
3 changed files with 6 additions and 3 deletions
2
.github/workflows/quality.yml
vendored
2
.github/workflows/quality.yml
vendored
|
|
@ -63,7 +63,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
name: linting-report
|
name: linting-report
|
||||||
path: |
|
path: |
|
||||||
*/build/reports/**/*.*
|
**/build/reports/**/*.*
|
||||||
- name: Prepare Danger
|
- name: Prepare Danger
|
||||||
if: always()
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
|
|
@ -172,6 +172,7 @@ allprojects {
|
||||||
|
|
||||||
// Register quality check tasks.
|
// Register quality check tasks.
|
||||||
tasks.register("runQualityChecks") {
|
tasks.register("runQualityChecks") {
|
||||||
|
dependsOn(":tests:konsist:testDebugUnitTest")
|
||||||
project.subprojects {
|
project.subprojects {
|
||||||
// For some reason `findByName("lint")` doesn't work
|
// For some reason `findByName("lint")` doesn't work
|
||||||
tasks.findByPath("$path:lint")?.let { dependsOn(it) }
|
tasks.findByPath("$path:lint")?.let { dependsOn(it) }
|
||||||
|
|
|
||||||
|
|
@ -33,9 +33,11 @@ dependencies {
|
||||||
testImplementation(projects.libraries.designsystem)
|
testImplementation(projects.libraries.designsystem)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure Konsist tests are always run. This is needed because otherwise we'd have to either:
|
// Make sure Konsist tests run for 'check' tasks. This is needed because otherwise we'd have to either:
|
||||||
// - Add every single module as a dependency of this one.
|
// - Add every single module as a dependency of this one.
|
||||||
// - Move the Konsist tests to the `app` module, but the `app` module does not need to know about Konsist.
|
// - Move the Konsist tests to the `app` module, but the `app` module does not need to know about Konsist.
|
||||||
tasks.withType<Test>().configureEach {
|
tasks.withType<Test>().configureEach {
|
||||||
outputs.upToDateWhen { false }
|
outputs.upToDateWhen {
|
||||||
|
gradle.startParameter.taskNames.any { it.contains("check", ignoreCase = true).not() }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue