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

[CI] Setup CI workflow for running Android-ComposeApp UI tests #556

Open
PatilShreyas opened this issue Oct 7, 2022 · 5 comments
Open
Labels
codebase-improvements hacktoberfest For partifipating in Hacktoberfest

Comments

@PatilShreyas
Copy link
Owner

PatilShreyas commented Oct 7, 2022

Description

Currently, only unit tests are executed on push or pull_request events. It would be nice to execute UI tests (of compose app) module as well.

Criteria for workflow

  • The workflow should run on push and pull-request event.
  • Should only run when Android project's directory source is changed.

Task steps

Once above criteria is met, run the following commands

./gradlew :app:composeapp:connectedCheck

Solution

For running emulator on CI, following action utility can be useful:
https://github.com/ReactiveCircus/android-emulator-runner

@PatilShreyas PatilShreyas added hacktoberfest For partifipating in Hacktoberfest codebase-improvements labels Oct 7, 2022
@krishnachaitanya0107
Copy link

Hi @PatilShreyas ,

I would like to try working on this issue . Could you please assign it to me .

Thanks

@PatilShreyas
Copy link
Owner Author

Thanks @krishnachaitanya0107 for showing interest in contributing to this. Sure, if you're interested, will assign this to you

@krishnachaitanya0107
Copy link

Hi @PatilShreyas ,

It would be really helpful if you could clarify a few things for me if possible .

  • You mentioned that currently Unit tests are executed on pull requests/push events , But i couldn't find anything like
    name: Unit Test
    run: chmod +x ./gradlew test
    in the workflows , So just wanted to understand whether the unit tests are being executed in a different way in your project
  • In the documentation of the action utility https://github.com/marketplace/actions/android-emulator-runner which you have suggested , They have suggested that using Mac-os for running the jobs on virtual machine but currently in the workflows which you have defined ubuntu-latest is being used , So what do you suggest me to go with ?

Thanks

@PatilShreyas
Copy link
Owner Author

  1. When command ./gradlew build is executed, tests are also executed.

  2. We need a separate job under build.yml which runs on macOS and dedicatedly executes UI tests.

@krishnachaitanya0107
Copy link

Ah , that makes sense . Thanks for the quick reply , really appreciate it .

@krishnachaitanya0107 krishnachaitanya0107 removed their assignment Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codebase-improvements hacktoberfest For partifipating in Hacktoberfest
Projects
Status: In progress
Development

No branches or pull requests

2 participants