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

Add emulators to CI #2980

Merged

Conversation

EmmanuelMess
Copy link
Member

@EmmanuelMess EmmanuelMess commented Nov 4, 2021

Description

See https://github.com/marketplace/actions/android-emulator-runner

Issue tracker

Automatic tests

  • Added test cases

Manual tests

  • Done

Build tasks success

Successfully running following tasks on local:

  • ./gradlew assembledebug
  • ./gradlew spotlessCheck

@EmmanuelMess EmmanuelMess marked this pull request as draft November 4, 2021 01:59
@EmmanuelMess EmmanuelMess changed the title Update android-build.yml Emulator test Nov 4, 2021
@EmmanuelMess EmmanuelMess force-pushed the emmanuelmess/test/emulator branch from aa66376 to fa81439 Compare November 4, 2021 02:06
@EmmanuelMess
Copy link
Member Author

@TranceLove is it possible we have two bouncycastle versions?

Execution failed for task ':file_operations:mergeDebugAndroidTestJavaResource'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction
   > 2 files found with path 'org/bouncycastle/x509/CertPathReviewerMessages_de.properties' from inputs:
      - /Users/runner/.gradle/caches/transforms-3/92fa7912644cde08f72c3724b3097931/transformed/jetified-bcprov-jdk15on-1.69.jar
      - /Users/runner/.gradle/caches/transforms-3/5b28974e4dfe4c658568efeb4ecd9578/transformed/jetified-bcprov-jdk15to18-1.68.jar
     Adding a packagingOptions block may help, please refer to
     google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.PackagingOptions.html
     for more information

@VishalNehra
Copy link
Member

@EmmanuelMess See dependency tree? Can exclude from one of the places.

@EmmanuelMess EmmanuelMess force-pushed the emmanuelmess/test/emulator branch 2 times, most recently from 2d7ef64 to a833ae7 Compare November 4, 2021 23:06
@EmmanuelMess
Copy link
Member Author

Are there no tests for android 16?

@EmmanuelMess EmmanuelMess changed the title Emulator test Add emulators to CI Nov 5, 2021
@EmmanuelMess EmmanuelMess marked this pull request as ready for review November 5, 2021 01:57
@EmmanuelMess
Copy link
Member Author

The failing test shows that the emulator works, but the test doesn't actually pass any longer.

@EmmanuelMess EmmanuelMess force-pushed the emmanuelmess/test/emulator branch from b5b47ea to 721ea35 Compare November 5, 2021 01:59
@TranceLove
Copy link
Collaborator

@TranceLove is it possible we have two bouncycastle versions?

Execution failed for task ':file_operations:mergeDebugAndroidTestJavaResource'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction
   > 2 files found with path 'org/bouncycastle/x509/CertPathReviewerMessages_de.properties' from inputs:
      - /Users/runner/.gradle/caches/transforms-3/92fa7912644cde08f72c3724b3097931/transformed/jetified-bcprov-jdk15on-1.69.jar
      - /Users/runner/.gradle/caches/transforms-3/5b28974e4dfe4c658568efeb4ecd9578/transformed/jetified-bcprov-jdk15to18-1.68.jar
     Adding a packagingOptions block may help, please refer to
     google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.PackagingOptions.html
     for more information

No. But I did hit the same problem before... and yes, I saw you did the module replacement trick on file_operations module too.

@EmmanuelMess EmmanuelMess force-pushed the emmanuelmess/test/emulator branch from 721ea35 to 22cec8f Compare November 12, 2021 01:45
@EmmanuelMess EmmanuelMess force-pushed the emmanuelmess/test/emulator branch from 22cec8f to fef4082 Compare January 30, 2022 19:11
@EmmanuelMess EmmanuelMess force-pushed the emmanuelmess/test/emulator branch from f6cf14e to eddadc4 Compare January 30, 2022 23:11
@EmmanuelMess EmmanuelMess force-pushed the emmanuelmess/test/emulator branch from 99cb611 to 9ecef42 Compare January 31, 2022 03:38
@EmmanuelMess EmmanuelMess force-pushed the emmanuelmess/test/emulator branch from 768d530 to f3f24f7 Compare February 1, 2022 22:17
@EmmanuelMess EmmanuelMess marked this pull request as draft February 1, 2022 23:08
@EmmanuelMess EmmanuelMess marked this pull request as ready for review February 1, 2022 23:09
@EmmanuelMess
Copy link
Member Author

@TranceLove @VishalNehra this is ready, some tests don't run and have been momentarily suppressed.

TranceLove and others added 4 commits February 2, 2022 19:59
- FtpServiceEspressoTest and TextEditorActivityEspressoTest have to keep disabled as they have to deal with latest storage access model
- Removed FtpServiceStaticMethodsTest.testGetLocalInetAddressMustBeAPAddress() since we don't check for 192.168.43.1 anymore after TeamAmaze#3030
- Fixed UtilsHandlerTest, as passwords are stored encrypted in database now
- FtpServiceEspressoTest and TextEditorActivityEspressoTest have to keep disabled as they have to deal with latest storage access model
- Removed FtpServiceStaticMethodsTest.testGetLocalInetAddressMustBeAPAddress() since we don't check for 192.168.43.1 anymore after TeamAmaze#3030
- Fixed UtilsHandlerTest, as passwords are stored encrypted in database now
For running Android R or above, where MANAGE_EXTERNAL_STORAGE permission have to be obtained prior running Espresso tests, or tests may fail.

Requires Android UI Automator framework, which requires min-sdk = 18, hence it's disabled by default :(
@EmmanuelMess
Copy link
Member Author

@TranceLove seems that the tests broke, one too many @Supress where removed.

@TranceLove
Copy link
Collaborator

@TranceLove seems that the tests broke, one too many @Supress where removed.

One more try: EmmanuelMess#22

@EmmanuelMess EmmanuelMess marked this pull request as draft February 4, 2022 00:02
@EmmanuelMess EmmanuelMess marked this pull request as ready for review February 4, 2022 01:01
@EmmanuelMess
Copy link
Member Author

@TranceLove @VishalNehra this is ready, some tests don't run and have been momentarily suppressed.

TranceLove
TranceLove previously approved these changes Feb 4, 2022
Copy link
Collaborator

@TranceLove TranceLove left a comment

Choose a reason for hiding this comment

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

I'm good to give this a +1.

@VishalNehra VishalNehra merged commit f21ea19 into TeamAmaze:release/3.7 Feb 5, 2022
@VishalNehra VishalNehra added this to the v3.7 milestone Feb 5, 2022
@EmmanuelMess EmmanuelMess deleted the emmanuelmess/test/emulator branch February 5, 2022 13:03
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.

3 participants