<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/medium-lzbty1duw" -->

---
title: Medium | daily.dev
description: A practical guide to running Android instrumented tests in CI using GitHub Actions. Covers enabling KVM on GitHub-hosted runners for fast emulator boot,...
canonical: https://daily.dev/posts/medium-lzbty1duw
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Medium | daily.dev
og:description: A practical guide to running Android instrumented tests in CI using GitHub Actions. Covers enabling KVM on GitHub-hosted runners for fast emulator boot,...
og:url: https://daily.dev/posts/medium-lzbty1duw
og:image: https://api.daily.dev/og/posts/lzbtY1dUW.png
og:image:alt: Medium
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Medium

**[Medium](https://daily.dev/sources/medium_js)** · 6 min read · 0 upvotes · 0 comments

## Summary

A practical guide to running Android instrumented tests in CI using GitHub Actions. Covers enabling KVM on GitHub-hosted runners for fast emulator boot, designing a reusable `workflow_call` workflow for Compose UI tests, parallelizing instrumented and unit tests in the PR pipeline, and writing stable Compose test cases for UI and navigation. Includes tips for handling failures, reproducing CI flakes locally, and uploading test reports as PR check annotations.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/@kkrishna22572/running-android-instrumented-tests-in-ci-emulators-compose-ui-github-actions-android-ci-cd-f63f9a182647>

## Questions this post answers

### How do I enable KVM for a faster Android emulator on GitHub Actions runners?

Add a udev rule granting access to the kvm device before starting the emulator: echo a rule setting KERNEL=="kvm" with GROUP="kvm", MODE="0666", and a static_node option to /etc/udev/rules.d/99-kvm4all.rules, then reload udev rules with udevadm control --reload-rules and trigger it with udevadm trigger --name-match=kvm. Without this, emulator boots on GitHub-hosted runners are painfully slow or flaky, turning a roughly 10-minute job into a timeout.

_daily.dev surfaces practical CI fixes like this for developers wiring up Android emulator testing._

### What emulator flags reduce flakiness when running Android instrumented tests headlessly in CI?

Use -no-window, -gpu swiftshader_indirect, -noaudio, -no-boot-anim, and -camera-back none together with disable-animations: true when configuring reactivecircus/android-emulator-runner. These CI-friendly flags cut rendering and audio noise on headless GitHub Actions runners, reducing flaky UI test failures caused by animations, GPU rendering issues, or unnecessary boot animations.

_Developers chasing flaky CI test runs can track emulator configuration tips like these on daily.dev._

### How should instrumented tests and unit tests be scheduled in a GitHub Actions PR pipeline?

Run instrumented tests in parallel with unit tests, both gated behind a lint check, so lint failures block both suites but passing lint lets the faster JVM unit tests and the slower emulator-based instrumented tests race simultaneously. This avoids serializing the pipeline while still giving progressive confidence: unit tests catch logic bugs in about 30 seconds, instrumented tests catch Android-specific bugs in around 5 minutes.

_Teams designing CI pipelines can compare test-parallelization strategies for Android builds on daily.dev._

## Similar posts on daily.dev

- [How to Build a Production-Ready Flutter CI/CD Pipeline with GitHub Actions: Quality Gates, Environments, and Store Deployment](https://daily.dev/posts/how-to-build-a-production-ready-flutter-ci-cd-pipeline-with-github-actions-quality-gates-environme-rpmoo0tv7) · freeCodeCamp · 1 upvotes · 0 comments
- [An Optimized Agentic Android Development Workflow](https://daily.dev/posts/an-optimized-agentic-android-development-workflow-tgmzigta4) · Atomic Spin · 1 upvotes · 0 comments
- [Medium](https://daily.dev/posts/medium-sntfm8mrk) · Medium · 1 upvotes · 0 comments
- [Agentic CI for Expo apps with TesterArmy — Expo blog](https://daily.dev/posts/agentic-ci-for-expo-apps-with-testerarmy-expo-blog-d5nssouhz) · Expo Blog · 0 upvotes · 0 comments

---

Tags: [#android](https://daily.dev/tags/android), [#cicd](https://daily.dev/tags/cicd), [#github-actions](https://daily.dev/tags/github-actions), [#jetpack-compose](https://daily.dev/tags/jetpack-compose)

[View this post on daily.dev](https://daily.dev/posts/medium-lzbty1duw)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Medium","url":"https://daily.dev/posts/medium-lzbty1duw","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/medium-lzbty1duw"},"datePublished":"2026-08-02T12:16:28.316Z","dateModified":"2026-09-14T07:52:46.841Z","description":"A practical guide to running Android instrumented tests in CI using GitHub Actions. Covers enabling KVM on GitHub-hosted runners for fast emulator boot,...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/065ee9e171bc8c0f0d8604660c734f49?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/065ee9e171bc8c0f0d8604660c734f49?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/medium-lzbty1duw","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"android,cicd,github-actions,jetpack-compose","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"Medium"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/medium-lzbty1duw#faq","mainEntity":[{"@type":"Question","name":"How do I enable KVM for a faster Android emulator on GitHub Actions runners?","acceptedAnswer":{"@type":"Answer","text":"Add a udev rule granting access to the kvm device before starting the emulator: echo a rule setting KERNEL==\"kvm\" with GROUP=\"kvm\", MODE=\"0666\", and a static_node option to /etc/udev/rules.d/99-kvm4all.rules, then reload udev rules with udevadm control --reload-rules and trigger it with udevadm trigger --name-match=kvm. Without this, emulator boots on GitHub-hosted runners are painfully slow or flaky, turning a roughly 10-minute job into a timeout. daily.dev surfaces practical CI fixes like this for developers wiring up Android emulator testing."}},{"@type":"Question","name":"What emulator flags reduce flakiness when running Android instrumented tests headlessly in CI?","acceptedAnswer":{"@type":"Answer","text":"Use -no-window, -gpu swiftshader_indirect, -noaudio, -no-boot-anim, and -camera-back none together with disable-animations: true when configuring reactivecircus/android-emulator-runner. These CI-friendly flags cut rendering and audio noise on headless GitHub Actions runners, reducing flaky UI test failures caused by animations, GPU rendering issues, or unnecessary boot animations. Developers chasing flaky CI test runs can track emulator configuration tips like these on daily.dev."}},{"@type":"Question","name":"How should instrumented tests and unit tests be scheduled in a GitHub Actions PR pipeline?","acceptedAnswer":{"@type":"Answer","text":"Run instrumented tests in parallel with unit tests, both gated behind a lint check, so lint failures block both suites but passing lint lets the faster JVM unit tests and the slower emulator-based instrumented tests race simultaneously. This avoids serializing the pipeline while still giving progressive confidence: unit tests catch logic bugs in about 30 seconds, instrumented tests catch Android-specific bugs in around 5 minutes. Teams designing CI pipelines can compare test-parallelization strategies for Android builds on daily.dev."}}]}
```

