Skip to content

chore: Add CI workflows for building and running the example app#13

Merged
kinyoklion merged 2 commits intomainfrom
devin/1772572272-add-ci-workflows
Mar 3, 2026
Merged

chore: Add CI workflows for building and running the example app#13
kinyoklion merged 2 commits intomainfrom
devin/1772572272-add-ci-workflows

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Mar 3, 2026

Add CI workflows for building and running the example app

Summary

Adds two GitHub Actions workflows to the hello-android project:

  • build.yml — Builds the debug APK using Gradle on ubuntu-22.04 with Java 17 (Temurin).
  • run.yml — Fetches the LaunchDarkly mobile key and flag key from AWS SSM, injects them into the source, builds the debug APK, launches it on an Android emulator (API 29, x86_64), and validates that the UI displays "feature flag evaluates to true".

Both workflows trigger on pushes and PRs to main, ignoring markdown-only changes.

All actions are pinned to full SHAs with inline version comments and a reference link to the release page above each uses: line.

Action versions used

Action Version SHA Reference
actions/checkout v4.2.2 11bd71901bbe5b1630ceea73d27597364c9af683 release
actions/setup-java v4.7.1 c5195efecf7bdfc987ee8bae7a71cb8b11521c00 release
launchdarkly/gh-actions/actions/release-secrets release-secrets-v1.2.0 bbbbbda684f500766264e7fe327668094ba83d1c release
jlumbroso/free-disk-space v1.3.1 54081f138730dfa15788a46383842cd2f914a1be release
reactivecircus/android-emulator-runner v2.34.0 324029e2f414c084d8b15ba075288885e74aef9c release

Review & Testing Checklist for Human

  • Verify SHA pins: Confirm each SHA in the table above matches the stated version tag on the corresponding GitHub action repository.
  • Verify AWS_ROLE_ARN repository variable: The run workflow requires vars.AWS_ROLE_ARN to be configured for the OIDC-based AWS credentials flow. Confirm this variable is set in the repo settings.
  • sed injection robustness: The mobile key is injected via sed -i "s/mobile-key-from-launch-darkly-website/$LAUNCHDARKLY_MOBILE_KEY/". If the mobile key contains / or other sed-special characters, this will break. Verify the key format is safe, or consider switching to a different delimiter.
  • uiautomator dump reliability: The evaluation validation uses adb exec-out uiautomator dump /dev/tty to capture UI text. Verify this reliably captures the flag evaluation text on the emulator. The 15-second sleep before the dump may need tuning if SDK initialization takes longer in CI.
  • Test workflow execution: Trigger or wait for both workflows to run and verify they complete successfully end-to-end.

Notes

  • Inspired by the js-core repo's react-native-detox.yml workflow.
  • SDK key retrieval follows the same release-secrets pattern used in other hello-app repos (e.g. hello-ruby).
  • The build workflow (build.yml) is straightforward and low-risk.
  • The run workflow (run.yml) uses KVM acceleration for emulator performance and frees disk space before launching the emulator to avoid space issues.

Link to Devin Session: https://app.devin.ai/sessions/0b2bb3fc4f5845238a581c78eefd5369
Requested by: rlamb@launchdarkly.com


Open with Devin

Co-Authored-By: rlamb@launchdarkly.com <rlamb@launchdarkly.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

…tion validation

Co-Authored-By: rlamb@launchdarkly.com <rlamb@launchdarkly.com>
@kinyoklion kinyoklion marked this pull request as ready for review March 3, 2026 21:29
@kinyoklion kinyoklion requested a review from a team as a code owner March 3, 2026 21:29
Copy link
Contributor Author

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

@kinyoklion kinyoklion changed the title Add CI workflows for building and running the example app chore: Add CI workflows for building and running the example app Mar 3, 2026
@kinyoklion kinyoklion merged commit a1cf34c into main Mar 3, 2026
4 checks passed
@kinyoklion kinyoklion deleted the devin/1772572272-add-ci-workflows branch March 3, 2026 21:37
kinyoklion added a commit to launchdarkly/hello-macos that referenced this pull request Mar 3, 2026
# Add CI workflows for building and running the example app

## Summary

Updates the existing build workflow (`ci.yml`) and adds a new run
workflow (`run.yml`) for the `hello-macos` project, following the same
pattern as [hello-android PR
#13](launchdarkly/hello-android#13).

**`ci.yml` changes:**
- Pins `actions/checkout` to SHA with version comment (`v4.2.2`)
- Adds version comment to existing pinned `setup-xcode` SHA (`v1.6.0`)
- Adds `-workspace 'hello-macos.xcworkspace'` to the `xcodebuild`
command
- Removes the `schedule` cron trigger (preserves `feat/**` branch
triggers)
- Renames job from `macos-build` to `build`

**`run.yml` (new):**
- Fetches mobile key and flag key from AWS SSM via `release-secrets`
- Injects credentials into source files via `sed` (using `|` delimiter
for safety)
- Builds the app with `xcodebuild`
- Launches the app with `open`, waits 15s, then uses AppleScript
(`osascript`) to read the window text and `grep` for `"feature flag
evaluates to true"`

### Action versions used

| Action | Version | SHA | Reference |
|---|---|---|---|
| `actions/checkout` | v4.2.2 |
`11bd71901bbe5b1630ceea73d27597364c9af683` |
[release](https://github.com/actions/checkout/releases/tag/v4.2.2) |
| `maxim-lobanov/setup-xcode` | v1.6.0 |
`60606e260d2fc5762a71e64e74b2174e8ea3c8bd` |
[release](https://github.com/maxim-lobanov/setup-xcode/releases/tag/v1.6.0)
|
| `launchdarkly/gh-actions/actions/release-secrets` |
release-secrets-v1.2.0 | `bbbbbda684f500766264e7fe327668094ba83d1c` |
[release](https://github.com/launchdarkly/gh-actions/releases/tag/release-secrets-v1.2.0)
|

## Updates since last revision

- Restored `feat/**` branch triggers in `ci.yml` for both `push` and
`pull_request` (per reviewer feedback).
- Switched `sed` delimiter from `/` to `|` in both key injection
commands for safer substitution (per reviewer feedback).

## Review & Testing Checklist for Human

CI is currently green (build, run, and semgrep all pass), but the
following items warrant manual verification:

- [ ] **AppleScript reliability across runner updates**: The `run.yml`
verification uses `osascript` with `System Events` to read UI text.
While this passed CI on `macos-14`, it relies on the runner granting
accessibility permissions to the shell. If GitHub updates runner
configurations this could break. This is the highest-risk item.
- [ ] **Process name in AppleScript**: The script references `process
"hello-macos"` — confirm this consistently matches the actual process
name when the `.app` bundle is launched. It may vary across Xcode/macOS
versions.
- [ ] **Verify SHA pins**: Confirm each SHA in the table above matches
the stated version tag on the corresponding action's releases page.
- [ ] **Intentional removal of `schedule` cron trigger**: The original
`ci.yml` had a daily cron schedule (`0 9 * * *`). This was removed to
align with the `hello-android` pattern. Confirm this is desired.

**Suggested test plan:** Trigger the `run.yml` workflow manually 2–3
times to confirm the AppleScript-based verification is stable and not
flaky due to timing or permissions.

### Notes

- Unlike Android, this does not require an emulator — the macOS app runs
natively on the `macos-14` runner.
- The 15-second sleep before reading the window text may need tuning if
SDK initialization takes longer in CI.
- SDK key retrieval follows the same `release-secrets` pattern used in
other hello-app repos.

---

Link to Devin Session:
https://app.devin.ai/sessions/cea1bda349b740048511ed04e7be5c61
Requested by: rlamb@launchdarkly.com

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: rlamb@launchdarkly.com <rlamb@launchdarkly.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants