Skip to content
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

use macos-latest for ui-showcase build on CI #3687

Merged
merged 3 commits into from
Jul 29, 2024
Merged

Conversation

whyoleg
Copy link
Collaborator

@whyoleg whyoleg commented Jul 9, 2024

In #3662 test started to fail on ui-showcase module because of ERROR CLASS.
This was fixed in #3663 and everything was fine locally.
But on CI we were building ui-showcase on Linux - and so before #3662 there were no macOS specific declarations there.
So we need to build it on macOS.
Looks like we need to do the same on TC. @adam-enko could you help here? Is it possible to run only UiShowcaseIntegrationTest on TC on macOS? Other tests should work fine with linux runner.

@whyoleg whyoleg self-assigned this Jul 9, 2024
@adam-enko
Copy link
Member

adam-enko commented Jul 9, 2024

Is it possible to run only UiShowcaseIntegrationTest on TC on macOS?

I think the best approach would be to skip tests on a case-by-case basis using JUnit.

import org.junit.jupiter.api.Assumptions.assumeTrue

@Test
fun foo() {
  assumeTrue(System.getProperty("os.name").lowercase().contains("mac"), "test requires macOS")
  // ...
}

EDIT: Actually, there's a built in annotation for this.

https://junit.org/junit5/docs/5.2.0/api/org/junit/jupiter/api/condition/EnabledOnOs.html

import org.junit.jupiter.api.condition.EnabledOnOs
import org.junit.jupiter.api.condition.OS

@Test
@EnabledOnOs(OS.MAC, disabledReason = "...")
fun foo() {
  // ...
}

@EnabledOnOs can also be added to UiShowcaseIntegrationTest so it will enable/disable all tests in the class.

@whyoleg whyoleg requested review from adam-enko and vmishenev and removed request for vmishenev July 12, 2024 11:51
Copy link
Member

@vmishenev vmishenev left a comment

Choose a reason for hiding this comment

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

I do not know how ui-showcase is used in UI testing. Is it ok for @berezinant to build the project only on macOS?

@berezinant
Copy link
Contributor

berezinant commented Jul 17, 2024

To build the project only on macOS will not be a problem for development
The only thing that could be affected is that we plan to run screenshot tests for ui-showcase project on CI and maybe there would be difficulties

UPD I see that there is still a possibility to run screenshot's at least against macOS so this is not an issue either

@IgnatBeresnev IgnatBeresnev merged commit ae2c46f into master Jul 29, 2024
13 checks passed
@IgnatBeresnev IgnatBeresnev deleted the macos-runner branch July 29, 2024 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants