NotyKT icon indicating copy to clipboard operation
NotyKT copied to clipboard

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

Open PatilShreyas opened this issue 2 years ago • 5 comments

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 avatar Oct 07 '22 16:10 PatilShreyas

Hi @PatilShreyas ,

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

Thanks

krishnachaitanya0107 avatar Oct 09 '22 08:10 krishnachaitanya0107

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

PatilShreyas avatar Oct 09 '22 08:10 PatilShreyas

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

krishnachaitanya0107 avatar Oct 09 '22 18:10 krishnachaitanya0107

  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.

PatilShreyas avatar Oct 09 '22 18:10 PatilShreyas

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

krishnachaitanya0107 avatar Oct 09 '22 18:10 krishnachaitanya0107