Skip to content

chore: Run iOS Harness tests with SimCam#4072

Open
kmagiera wants to merge 2 commits into
mrousavy:mainfrom
kmagiera:kmagiera/simcam-harness-ci
Open

chore: Run iOS Harness tests with SimCam#4072
kmagiera wants to merge 2 commits into
mrousavy:mainfrom
kmagiera:kmagiera/simcam-harness-ci

Conversation

@kmagiera

@kmagiera kmagiera commented Jul 13, 2026

Copy link
Copy Markdown

Add a GitHub Actions workflow that runs the SimpleCamera iOS React Native Harness suite against a controllable camera source on a GitHub-hosted simulator. This brings simulator camera coverage into regular CI without requiring a physical Device Farm run.

Workflow setup:

  • use the standard macos-26 runner with an iPhone 17 Pro simulator on iOS 26.5
  • install the floating latest SimCam Homebrew cask, activate it with SIMCAM_LICENSE_TOKEN, and select a deterministic static image source
  • keep simulator selection and lifecycle inside React Native Harness instead of manually booting or recording the simulator
  • build the app, run the harness, and retain harness and Xcode logs for diagnosis

Harness compatibility:

  • rn-harness.config.mjs previously treated every CI environment as a physical-device run. HARNESS_IOS_DEVICE_MODE adds an explicit simulator override for this workflow while preserving physical-device behavior for existing CI jobs and simulator behavior for local runs.
  • SimCam supplies camera video frames but does not emulate microphone input. HARNESS_SIMCAM is scoped to this workflow and skips only the records-with-audio-enabled case; all other camera and video coverage remains enabled, and non-SimCam runs continue to execute the audio case unchanged.

Verification:

Discussion:

The workflow is based on the harness-aws-device.yml and in particular uses the same paths filters for dispatch. I'm not familiar with the repository structure but given the simcam-based tests should be much faster and less expensive to run we may want to use a different set of patterns and run them more frequently if it makes sense.

Future work

Currently simcam runs the same suite of tests that also runs on the device farm. However, these tests barely test camera related capabilities and mostly focus on configuring the camera APIs properly. Simcam allows for controlling what the camera actually sees, so it opens new possibilities for tests that can also verify the output of camera related functionalities rather than just checking whether the camera component showed up on screen.

Add a GitHub Actions workflow that runs the SimpleCamera iOS React Native Harness suite against a controllable camera source on a GitHub-hosted simulator. This brings simulator camera coverage into regular CI without requiring a physical Device Farm run.

Workflow setup:

- use the standard macos-26 runner with an iPhone 17 Pro simulator on iOS 26.5
- install the floating latest SimCam Homebrew cask, activate it with SIMCAM_LICENSE_TOKEN, and select a deterministic static image source
- keep simulator selection and lifecycle inside React Native Harness instead of manually booting or recording the simulator
- build the app, run the harness, and retain harness and Xcode logs for diagnosis
- use a 402x720 source image that preserves useful visual detail while keeping the repository asset under 700 KB

Harness compatibility:

- rn-harness.config.mjs previously treated every CI environment as a physical-device run. HARNESS_IOS_DEVICE_MODE adds an explicit simulator override for this workflow while preserving physical-device behavior for existing CI jobs and simulator behavior for local runs.
- SimCam supplies camera video frames but does not emulate microphone input. HARNESS_SIMCAM is scoped to this workflow and skips only the records-with-audio-enabled case; all other camera and video coverage remains enabled, and non-SimCam runs continue to execute the audio case unchanged.

Verification:

- 13 test suites passed
- 120 tests passed and 31 unsupported or conditional cases were skipped
- public sanitized logs: https://gist.github.com/kmagiera/faf73ad38085234ff51ab3aa5752f905
@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

@kmagiera is attempting to deploy a commit to the Margelo Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

🤣

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