Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Konsist] Integration & Custom Tests #13824

Draft
wants to merge 6 commits into
base: trunk
Choose a base branch
from

Conversation

ParaskP7
Copy link
Contributor


Description

TODO


Testing information

TODO


  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

  • The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on big (tablet) and small (phone) in case of UI changes, and no regressions are added.

@ParaskP7 ParaskP7 added status: do not merge Dependent on another PR, ready for review but not ready for merge. category: tooling Anything that involves building & maintaining the project, including scripts, `Fastfile`, etc. Testing Core labels Mar 21, 2025
@dangermattic
Copy link
Collaborator

1 Message
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

@ParaskP7 ParaskP7 force-pushed the konsist/integration-and-custom-tests branch from 91b6adc to 8a92d8c Compare March 21, 2025 15:19
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Mar 21, 2025

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit5f5445c
Direct Downloadwoocommerce-wear-prototype-build-pr13824-5f5445c.apk

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Mar 21, 2025

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit5f5445c
Direct Downloadwoocommerce-prototype-build-pr13824-5f5445c.apk

@ParaskP7 ParaskP7 force-pushed the konsist/integration-and-custom-tests branch from 8a92d8c to 995002a Compare March 21, 2025 16:18
@ParaskP7 ParaskP7 requested a review from Copilot March 27, 2025 11:27
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR integrates the Konsist dependency and adds a custom CI step for running Konsist along with the tests.

  • Added Konsist version configuration in gradle/libs.versions.toml.
  • Introduced a new Buildkite pipeline step to execute Konsist via Gradle.

Reviewed Changes

Copilot reviewed 3 out of 20 changed files in this pull request and generated no comments.

File Description
gradle/libs.versions.toml Added Konsist dependency version and its module configuration.
.buildkite/pipeline.yml Created a new pipeline step labeled "konsist" to run gradlew konsist.
Files not reviewed (17)
  • .buildkite/commands/run-unit-tests.sh: Language not supported
  • libs/konsist-tests/build.gradle: Language not supported
  • libs/konsist-tests/src/test/java/com/woocommerce/android/konsist/test/KonsistAnnotationsTest.kt: Language not supported
  • libs/konsist-tests/src/test/java/com/woocommerce/android/konsist/test/KonsistComposeTest.kt: Language not supported
  • libs/konsist-tests/src/test/java/com/woocommerce/android/konsist/test/KonsistFieldsTest.kt: Language not supported
  • libs/konsist-tests/src/test/java/com/woocommerce/android/konsist/test/KonsistFilesTest.kt: Language not supported
  • libs/konsist-tests/src/test/java/com/woocommerce/android/konsist/test/KonsistFunctionsTest.kt: Language not supported
  • libs/konsist-tests/src/test/java/com/woocommerce/android/konsist/test/KonsistGenericsTest.kt: Language not supported
  • libs/konsist-tests/src/test/java/com/woocommerce/android/konsist/test/KonsistImportsTest.kt: Language not supported
  • libs/konsist-tests/src/test/java/com/woocommerce/android/konsist/test/KonsistLogsTest.kt: Language not supported
  • libs/konsist-tests/src/test/java/com/woocommerce/android/konsist/test/KonsistNamingTest.kt: Language not supported
  • libs/konsist-tests/src/test/java/com/woocommerce/android/konsist/test/KonsistPackagesTest.kt: Language not supported
  • libs/konsist-tests/src/test/java/com/woocommerce/android/konsist/test/KonsistParametersTest.kt: Language not supported
  • libs/konsist-tests/src/test/java/com/woocommerce/android/konsist/test/KonsistPropertiesTest.kt: Language not supported
  • libs/konsist-tests/src/test/java/com/woocommerce/android/konsist/test/KonsistTestsTest.kt: Language not supported
  • libs/konsist-tests/src/test/java/com/woocommerce/android/konsist/test/KonsistUseCasesTest.kt: Language not supported
  • settings.gradle: Language not supported
Comments suppressed due to low confidence (1)

.buildkite/pipeline.yml:41

  • The artifact paths for the 'konsist' step are currently set to capture test report files. If Konsist produces its own distinct reports, please update these artifact paths to correctly capture those outputs.
          - "**/build/reports/tests/**/*"

FYI: This change includes adding this extra script related
'-x libs:konsist-test:testDebugUnitTest' configuration on unit tests so
that 'Konsist' tests are excluded from running as part of all the
other "normal" unit tests.
This commit demonstrates how an existing custom Detekt rule can be
easily converted to Konsist, and, at the same time showcases how
Konsist's declarative nature makes it easier to write and maintain such
checks.
This commit demonstrates how an existing documented Compose guideline
can be easily converted to Konstist, and, at the same time showcases how
adding a KDoc on top of this custom test/rule make this a living
document.
@ParaskP7 ParaskP7 force-pushed the konsist/integration-and-custom-tests branch from 995002a to 5f5445c Compare March 28, 2025 14:33
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
category: tooling Anything that involves building & maintaining the project, including scripts, `Fastfile`, etc. Core status: do not merge Dependent on another PR, ready for review but not ready for merge. Testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants