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

fix failed test #797

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

fix failed test #797

wants to merge 12 commits into from

Conversation

Yamada-Ika
Copy link
Contributor

@Yamada-Ika Yamada-Ika commented Aug 25, 2024

Issue

Overview (Required)

  • In the test for reading JSON files, the test was failing because the file could not be found when the target was iOS. According to this slide, since the working directory differs by platform, hardcoding the path can prevent resource retrieval on one of the platforms. Therefore, we implemented a utility function in core:testing for reading files specific to each platform and abstracted the file reading method on the consumer side.

Acceptance conditions

  • Passing ProfileCardJsonTest with iOS

Links

Screenshot (Optional if screenshot test is present or unrelated to UI)

Before After

Movie (Optional)

Before After

@Yamada-Ika Yamada-Ika self-assigned this Aug 25, 2024
Copy link

Detekt check failed. Please run ./gradlew detekt --auto-correct to fix the issues.

@github-actions github-actions bot temporarily deployed to deploygate-distribution August 25, 2024 12:02 Inactive
@github-actions github-actions bot temporarily deployed to deploygate-distribution August 26, 2024 13:27 Inactive
@github-actions github-actions bot temporarily deployed to deploygate-distribution August 27, 2024 18:26 Inactive
@Yamada-Ika Yamada-Ika marked this pull request as ready for review August 27, 2024 18:36
@Yamada-Ika Yamada-Ika requested a review from a team August 28, 2024 10:53
@takahirom
Copy link
Member

I don't think we have a CI set up for running this test, which means it could break at any time. Could you add it? I think running just one task is enough.

Comment on lines 38 to 42
- run: |
./gradlew \
:core:data:iosSimulatorArm64Test \
:core:model:iosSimulatorArm64Test \
--stacktrace
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I apologize for delay. 🙇
There were another module for which iOS tests were not being run, so I specified them.
I am not similar with Gradle syntax, but is this acceptable?

Comment on lines 38 to 42
- run: |
./gradlew \
:core:data:iosSimulatorArm64Test \
:core:model:iosSimulatorArm64Test \
--stacktrace
Copy link
Member

Choose a reason for hiding this comment

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

Thanks! The iosSimulatorArm64Test might be skipped on ubuntu-latest. Could we change ubuntu-latest to macos-latest?
Additionally, we might need to modify the screenshot-comparison workflow to use macos-latest so that we have the same environment for the screenshots. I think we could merge the existing tests to speed up the process.

      - run: ./gradlew \
            testDevDebugUnitTest \
            testDebugUnitTest \
            :core:data:iosSimulatorArm64Test \
            :core:model:iosSimulatorArm64Test \
            --stacktrace

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@Yamada-Ika Yamada-Ika Sep 1, 2024

Choose a reason for hiding this comment

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

Sorry, CI failed 🙇
I will try to fix

@github-actions github-actions bot temporarily deployed to deploygate-distribution September 1, 2024 11:05 Inactive
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.

:core:data:allTests fails if tests run by gradle commands.
2 participants