NotyKT
NotyKT copied to clipboard
[CI] Setup CI workflow for running Android-ComposeApp UI tests
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
andpull-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
Hi @PatilShreyas ,
I would like to try working on this issue . Could you please assign it to me .
Thanks
Thanks @krishnachaitanya0107 for showing interest in contributing to this. Sure, if you're interested, will assign this to you
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
-
When command
./gradlew build
is executed, tests are also executed. -
We need a separate job under
build.yml
which runs on macOS and dedicatedly executes UI tests.
Ah , that makes sense . Thanks for the quick reply , really appreciate it .