-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not run integration tests on check
#3517
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just in case: does CI fine with it?
Minor: it would be good to have some minimal description on why we revert this at least in PR description :)
Also for future readers and to add some context: this will revert some changes which was done in one of the previous PRs and was discussed a lot in this thread #3427 (comment)
pinging @adam-enko just in case
Whether integration tests should be run on I needed to run I found no way to run If the majority of core developers agree that it's not convenient, I think it should be removed, even if it breaks some conventions. @whyoleg @vmishenev @atyrin could you please vote with 👍 or 👎 ? If the majority thinks the way it is now is convenient, we can leave it, no problem To clarify,
|
@whyoleg @vmishenev I see you've already approved the PR while I was writing the message, but just in case: this is not required (not a top-down decision), you can vote against it if you think that |
Since we are here, could you adjust the contribution guide regarding the new way of running/excluding integration tests? And probably GitHub workflows (if it required)? |
'build' is a lifecycle task that runs both 'check' and 'assemble', so if you want to skip checks, can you just run `./gradlew assemble'? |
The idea is not to just So, another possible option: make |
Yeah, the situation is pretty much how Oleg described it. I updated something that may affect all parts of Dokka in various ways: maybe something won't compile or will result in a warning, maybe some unit tests won't pass, maybe we return a type from stdlib somewhere in our public API and it was changed incompatibly, and so on. So I want to run all tests and checks without running the integration tests (to catch all obvious problems), and then submit a PR (which runs integration tests) and switch to working on a different issue. This is quite a frequent scenario, at least for me I've updated the documentation, both |
Here's a summary of the reasonable options, in tabular form. What I want to demonstrate is that I'm not sure how to achieve the tasks with ❓ in this PR, while it is possible to run quick checks in all scenarios.
I agree that it's rarely convenient to run all tests, and so it's important to have an alternative. For some more context, we're ~4 PRs away from being able to enable Configuration Cache (for the Dokka build scripts). This will allow for parallel tasks, reducing the time to run all tests on my machine to ~20 minutes. Which is still too long for a quick check, but a significant improvement. I've been working on the integration tests a lot so it impacts me if there's no easy way to run all checks. It also adds some friction when I switch between projects that don't follow the Gradle conventions. |
I haven't checked, but from my understanding with this PR it will be:
As for me, It looks like a good balance, as running |
These two make sense, thanks.
This will miss some integration tests, e.g. https://github.com/Kotlin/dokka/blob/master/dokka-integration-tests/gradle/src/test/kotlin/StdLibDocumentationIntegrationTest.kt |
While this is possible to overcome, I see, that there are some quirks here and there and understanding of everything is far from ideal. I still think, that what is proposed in this PR is a good balance for all of us and integration tests should be optional locally (even if they run for "just" 20 minutes). Last idea that I had in mind, after it I'm done with arguing on this topic:
If needed we could introduce The reasoning is the same and is simple: integration tests are not required for local day-to-day development. While Gradle has some conventions (who has not?), I think that we do need to not strictly follow conventions, but be idiomatic (your now what I mean, we are working with/on Kotlin). And IMO, idiomatic here - something that is used more frequently (running tests and basic checks like BCV) should be fast, easy, more understandable, convenient, familiar to users (Dokka Team and external contributors) and running integration tests is not one of such things, as it could take abnormal amount of time on not so new PC (not everyone has Mac M1/M2/M3 with 12 cores) and can even fail for unrelated reason because something is configured wrong locally (f.e Android SDK) |
Actually, this is a good idea to explore! @adam-enko would it make it any better in your opinion?
Then It looks kind of like middle ground: |
8e7127f
to
627cc82
Compare
Our colleagues from the Kotlin Analysis API team stumbled upon this recently - they wanted to build Dokka locally to test some K2-related fixes, but because the integration tests are run by default, they couldn't (due to problems with configuration/resources). Sadly, this is an instance of what was mentioned above, where it starts being an inconvenience if you're out of context and don't know how to deal with it I'll merge this PR now to unblock colleagues, but I'd be happy to continue the discussion on how to implement in a better way here or someplace else |
No description provided.