Add workflow for recording Android screenshots with hardware-accelerated emulator#578
Conversation
Co-authored-by: mmathieum <177998+mmathieum@users.noreply.github.com>
…references Co-authored-by: mmathieum <177998+mmathieum@users.noreply.github.com>
Co-authored-by: mmathieum <177998+mmathieum@users.noreply.github.com>
Co-authored-by: mmathieum <177998+mmathieum@users.noreply.github.com>
Co-authored-by: mmathieum <177998+mmathieum@users.noreply.github.com>
Co-authored-by: mmathieum <177998+mmathieum@users.noreply.github.com>
Co-authored-by: mmathieum <177998+mmathieum@users.noreply.github.com>
Co-authored-by: mmathieum <177998+mmathieum@users.noreply.github.com>
Co-authored-by: mmathieum <177998+mmathieum@users.noreply.github.com>
Co-authored-by: mmathieum <177998+mmathieum@users.noreply.github.com>
Co-authored-by: mmathieum <177998+mmathieum@users.noreply.github.com>
Co-authored-by: mmathieum <177998+mmathieum@users.noreply.github.com>
Co-authored-by: mmathieum <177998+mmathieum@users.noreply.github.com>
Co-authored-by: mmathieum <177998+mmathieum@users.noreply.github.com>
…orkflow-screenshots
…orkflow-screenshots
|
/gemini review |
There was a problem hiding this comment.
Code Review
The pull request introduces a new GitHub Actions workflow to automate the recording of Android screenshots. The workflow dynamically determines the API level, sets up the emulator, downloads APKs, sets GPS location and timezone, and then captures and uploads screenshots. It also handles committing the screenshots either directly to the branch or by creating a pull request. The changes are well-structured and address the requirements. I've identified a few areas for improvement regarding script reusability, error handling, and workflow logic, with specific attention to exit codes and their implications for subsequent steps, aligning with best practices for GitHub Actions workflows that generate and commit files.
Adds manually-triggered GitHub Actions workflow to record Play Store screenshots using hardware-accelerated emulators with automated app setup.
Implementation
sdk-targetfromcommons/gradle/libs.versions.toml(currently 35) rather than hardcodingswiftshader_indirectfor Linux runner compatibilitygtfs_rts_values_gen.xml./.github/actions/setupfor consistent environment configuration (submodules, JDK, Gradle)commitDirectlyallows choosing between:shared/setup-and-all-app-screenshots.shhandles:org.mtransit.androidpackagecommons-android/pub/all-app-screenshots.shto capture screenshotsapp-android/src/main/res-current/values/current_gtfs_rts_values_gen.xml(min/max lat/lng)app-android/src/main/res/values/bike_station_values.xml(bike_station min/max lat/lng)gtfs_rts_values_gen.xmland configures emulator accordingly-no-snapshot-saveto emulator options to prevent saving corrupted launcher stateapp-android/src/main/play/listings/*/graphics/*-screenshots/*.pngcommitDirectlyis false)commitDirectlyis true)Workflow Location
Workflow placed in
shared-overwrite/.github/workflows/for distribution to all main repos via submodule sync.Setup script placed in
shared/to be available during workflow execution without persisting in target repos.Note: The workflow uses
commons/gradle/libs.versions.tomlpath and supports multiple repository types (GTFS transit and bike stations) to correctly work when distributed to repositories that use commons as a submodule.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.