Browse Source

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
pull/2560/head
Jorge Martin Espinosa 2 months ago committed by GitHub
parent
commit
57e6db8144
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      .github/workflows/quality.yml
  2. 1
      build.gradle.kts
  3. 6
      tests/konsist/build.gradle.kts

2
.github/workflows/quality.yml

@ -63,7 +63,7 @@ jobs: @@ -63,7 +63,7 @@ jobs:
with:
name: linting-report
path: |
*/build/reports/**/*.*
**/build/reports/**/*.*
- name: Prepare Danger
if: always()
run: |

1
build.gradle.kts

@ -172,6 +172,7 @@ allprojects { @@ -172,6 +172,7 @@ allprojects {
// Register quality check tasks.
tasks.register("runQualityChecks") {
dependsOn(":tests:konsist:testDebugUnitTest")
project.subprojects {
// For some reason `findByName("lint")` doesn't work
tasks.findByPath("$path:lint")?.let { dependsOn(it) }

6
tests/konsist/build.gradle.kts

@ -33,9 +33,11 @@ dependencies { @@ -33,9 +33,11 @@ dependencies {
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.
// - Move the Konsist tests to the `app` module, but the `app` module does not need to know about Konsist.
tasks.withType<Test>().configureEach {
outputs.upToDateWhen { false }
outputs.upToDateWhen {
gradle.startParameter.taskNames.any { it.contains("check", ignoreCase = true).not() }
}
}

Loading…
Cancel
Save