{"id":13530166,"url":"https://github.com/Malinskiy/action-android","last_synced_at":"2025-04-01T17:32:12.106Z","repository":{"id":41461616,"uuid":"211642948","full_name":"Malinskiy/action-android","owner":"Malinskiy","description":"Collection of Android-related GitHub Actions","archived":false,"fork":false,"pushed_at":"2024-08-06T01:39:09.000Z","size":7726,"stargazers_count":183,"open_issues_count":16,"forks_count":23,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-10-30T08:17:26.477Z","etag":null,"topics":["action-android","actions","android","android-emulators","android-sdk","ci","emulator","emulator-start","github","github-actions","githubactions","install","sdk","testing"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Malinskiy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["Malinskiy"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2019-09-29T10:04:19.000Z","updated_at":"2024-10-24T01:45:20.000Z","dependencies_parsed_at":"2024-01-21T14:44:03.894Z","dependency_job_id":"7b0530b5-302e-4551-90d5-4a7f005e7e75","html_url":"https://github.com/Malinskiy/action-android","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malinskiy%2Faction-android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malinskiy%2Faction-android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malinskiy%2Faction-android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malinskiy%2Faction-android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Malinskiy","download_url":"https://codeload.github.com/Malinskiy/action-android/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222748294,"owners_count":17031898,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["action-android","actions","android","android-emulators","android-sdk","ci","emulator","emulator-start","github","github-actions","githubactions","install","sdk","testing"],"created_at":"2024-08-01T07:00:45.034Z","updated_at":"2024-11-02T16:31:48.016Z","avatar_url":"https://github.com/Malinskiy.png","language":"TypeScript","readme":"# action-android \n\nThis is a collection of GitHub Actions for Android development\n\n# Requirements\n\nTested with **macOS-12** and **ubuntu-latest** runner images. It might work using other runners (including self-hosted ones) but there is no support for them.\n\n## Android SDK\nThis repo provides an action for installing the Android SDK on the build agent. It will override whatever setup is \nalready there. You might want to do this since default GitHub Actions environments are now missing `sdkmanager` binary\nso they're immutable.\n\n### Usage\n\n```yaml\nsteps:\n  - uses: actions/checkout@v1\n\n  # Download \u0026 install the Android SDK.\n  - uses: malinskiy/action-android/install-sdk@release/0.1.6\n\n  # Set up platform tools like adb.\n  - run: sdkmanager platform-tools\n\n  # Start ADB (and verify that pathing is working correctly).\n  - run: adb devices\n\n  # Verify $ANDROID_HOME is properly set for later Gradle commands.\n  - run: echo $ANDROID_HOME\n```\n\n## Building your code\nThere is an official [action](https://github.com/actions/setup-java) for Java setup. For execution using Gradle \nI suggest to use `./gradlew` to minimize the dependency on environment setup.\n\n## Testing against Android Emulator\n`action-android/emulator-run-cmd` provide an action which installs the emulator packages, starts the emulator and waits\nuntil it's booted. After this it will execute the provided cmd and stop the running emulator.\n\nIt's imperative(!) to use `runs-on: ubuntu-latest` with KVM enabled or `runs-on: macOS-12` if you want to have hardware acceleration for your emulator.\n\n### Enabling KVM for ubunut-latest\n```\n- name: Enable KVM\n  run: |\n    echo 'KERNEL==\"kvm\", GROUP=\"kvm\", MODE=\"0666\", OPTIONS+=\"static_node=kvm\"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules\n    sudo udevadm control --reload-rules\n    sudo udevadm trigger --name-match=kvm\n```\n\n### Usage\n\n```yaml\nsteps:\n  - uses: actions/checkout@v1\n  - uses: malinskiy/action-android/emulator-run-cmd@release/0.1.6\n    with:\n      cmd: ./gradlew integrationTest\n      api: 25\n      tag: default\n      abi: x86\n```\n\n- `cmd` is the shell command to execute while the emulator is booted\n- `api` is the API version of emulator\n- `tag` is either the **default** or **google_apis**. Use google_apis for emulator with google store\n- `abi` is the abi of the emulator. x86 is the fastest one\n- `hardwareProfile` is the hardware profile of the emulator. Check the `avdmanager list` for supported value. I advise to use string names instead of ids since those might change between sdk updates\n- `cmdOptions` is value which you can use to pass additional arguments to the emulator start command. By default this is `-no-snapshot-save -noaudio -no-boot-anim`\n- `disableAnimations` to disable animations using the system preferences. `false` by default. Keep in mind that applications might not respect system settings and these might have no effect at all \n- `bootTimeout` is the emulator boot timeout (default is 600 seconds = 10 minutes)\n- `verbose` if you want to enable additional logging for this action\n\n### Artifacts\nThe `emulator-run-cmd` action will generate an `artifacts/logcat.log` artifact that you can use in your builds to investigate issues. For example the next snippet will save the artifact in case the previous steps had failures (your tests failed and you need these logs for investigation).\n\n```yaml\n- name: Save logcat output\n  uses: actions/upload-artifact@master\n  if: failure()\n  with:\n    name: logcat\n    path: artifacts/logcat.log\n```\n\n### Info about emulator-start and emulator-stop actions\nCurrently GitHub Actions do not support OS processes that outlive the specific step hence you can't really do a \nworkflow that starts the emulator and then execute your testing command in a separate step. This is the reason why\nI've written the combined `emulator-run-cmd` action. If you have multiple commands to run in parallel to emulator I suggest to write a script and execute it via the cmd arg.\n\n# License\n\n```\nMIT License\n\nCopyright (c) 2020 Anton Malinskiy\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n\n## Android SDK\nBy using this action you're automatically accepting the relevant licenses of Android SDK. See the Android SDK for more details.\n","funding_links":["https://github.com/sponsors/Malinskiy"],"categories":["TypeScript","Community Resources"],"sub_categories":["Collection of Actions"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMalinskiy%2Faction-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMalinskiy%2Faction-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMalinskiy%2Faction-android/lists"}