Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
931c1e6
ci: fix e2e jobs (gradle.properties newline, Xcode with Swift 6.4), P…
adhorodyski Nov 23, 2026
dde2551
ci: pre-boot the iOS simulator, upload hidden e2e traces
adhorodyski Nov 23, 2026
288da6c
fix(example): compact scenario chips so every tap target fits a small…
adhorodyski Nov 23, 2026
6efe49a
ci(ios): longer agent-device daemon startup timeout, keep daemon logs…
adhorodyski Nov 23, 2026
003cf29
fix(ios): log handOff counts as integers so the unified log does not …
adhorodyski Nov 23, 2026
1253a27
ci(ios): dump the simulator log on e2e failure
adhorodyski Nov 23, 2026
ea0d6dd
fix(e2e): capture the iOS device log with log stream (log show takes …
adhorodyski Nov 23, 2026
02512e5
ci(android): hide ANR dialogs so a slow Pixel Launcher cannot cover t…
adhorodyski Nov 23, 2026
cb6ec2a
ci: retry the Gradle build once, raise e2e action timeout for slow ru…
adhorodyski Nov 23, 2026
5f50057
feat(context): runtime patch with ROOT fast path and interval roots
adhorodyski Nov 23, 2026
d5f05cc
feat(context): startup probe and degraded scope attribute
adhorodyski Nov 23, 2026
55867f6
fix(context): merge scope stamps per tracer, log the degraded error once
adhorodyski Nov 23, 2026
8640375
feat(metro): withOtel installs the context patch first
adhorodyski Nov 23, 2026
81c32b5
chore(index): drop redundant empty export
adhorodyski Nov 23, 2026
69e4c04
feat(sdk): startReactNativeSdk attach and fallback init
adhorodyski Nov 23, 2026
3362ab2
fix(sdk): report a foreign global tracer provider; drop stale clock-a…
adhorodyski Nov 23, 2026
2f17e49
feat(android-core): seam spans exported through otel-java
adhorodyski Nov 23, 2026
5278f04
fix(verify): fast-jvm fails the stage on spawn errors
adhorodyski Nov 23, 2026
feaa270
feat(android-core): config, endpoint and headers
adhorodyski Nov 23, 2026
dcb7914
feat(android-core): explicit parenting helper
adhorodyski Nov 23, 2026
a4c7bb1
feat(ios-core): seam spans exported through opentelemetry-swift
adhorodyski Nov 23, 2026
4bd0920
fix(ios-core): exporter headers via envVarHeaders, gzip on; condition…
adhorodyski Nov 23, 2026
4558efa
feat(ios-core): config, endpoint and headers
adhorodyski Nov 23, 2026
e5a452c
feat(ios-core): explicit parenting helper
adhorodyski Nov 23, 2026
ae81e8c
ci: static-fast runs every non-e2e stage; unset TRACEPARENT for nativ…
adhorodyski Nov 23, 2026
af980d9
feat(verify): VERIFY_E2E_DRAFT drafts a missing expected file and sti…
adhorodyski Nov 24, 2026
9b274c3
chore(verify): re-baseline the SDK bundle share now the example bundl…
adhorodyski Nov 24, 2026
a6b9467
test(example): context guarantees on Hermes
adhorodyski Nov 24, 2026
507327e
chore(deps): add jest-environment-jsdom for web unit tests
adhorodyski Nov 23, 2026
35007d0
feat(web): startReactNativeSdk with its own TracerProvider and proto …
adhorodyski Nov 23, 2026
7dbaa48
refactor(web): drop the context-manager takeover; setup registers our…
adhorodyski Nov 23, 2026
fbd8a0b
chore(deps): add vite 7.3.8 devDependency
adhorodyski Nov 23, 2026
2dd5e6b
feat(web): Vite helper
adhorodyski Nov 23, 2026
5472b2a
fix(verify): no e2e retries in draft mode, so a drafting run never en…
adhorodyski Nov 24, 2026
d2e1c12
test(verify): device-drafted android files for nest-raf and event-emi…
adhorodyski Nov 24, 2026
4d6195a
feat(android): Nitro adapter and native-first init
adhorodyski Nov 24, 2026
78482b1
fix(android,metro): expose the otel API, keep the package out of inli…
adhorodyski Nov 24, 2026
9b822cd
test(verify): device-drafted ios files for nest-raf and event-emitter…
adhorodyski Nov 24, 2026
2a80d7f
feat(ios): Nitro adapter and native-first init
adhorodyski Nov 24, 2026
07bcdec
chore: sync distro version constants on changeset version; spec notes…
adhorodyski Nov 24, 2026
0b215ca
chore(verify): re-baseline the SDK bundle share after the example dro…
adhorodyski Nov 24, 2026
3a30697
feat(example): TestNative Nitro module over the public RNOtel helpers…
adhorodyski Nov 24, 2026
f484006
test: cross-boundary parenting both directions
adhorodyski Nov 24, 2026
f1d8110
chore(verify): drift check covers the example TestNative nitrogen output
adhorodyski Nov 24, 2026
1e26a36
test: failure scenarios on device
adhorodyski Nov 24, 2026
d6d1af1
test(verify): tighten the failure scenario checks (review minors)
adhorodyski Nov 24, 2026
c51b1c8
fix(android): consumer R8 rules for minifying apps (otel-java reflect…
adhorodyski Nov 24, 2026
d68af53
feat(example-expo): JS-fallback init verified against the same files
adhorodyski Nov 24, 2026
aaf8f59
chore(example-expo): name the shared Babel plugin; mark cleartext exa…
adhorodyski Nov 24, 2026
1181b9f
chore(deps): add @e2e-dev/web 0.16.1, react-dom 19.3.0 and react-nati…
adhorodyski Nov 24, 2026
3e6fcfc
fix(example): move the OTEL_TEST_MODE Babel plugin to its own file
adhorodyski Nov 24, 2026
13b27ca
test(web): e2e target for all JS scenarios
adhorodyski Nov 24, 2026
8dd8fa2
chore(example): call vite by path from the web scripts; VERIFY.md not…
adhorodyski Nov 24, 2026
b2802d5
fix(example): rebundle the Android release when lib/, src/, verify/ o…
adhorodyski Nov 24, 2026
827ad24
test: device smoke and performance guardrail
adhorodyski Nov 24, 2026
46848ee
test: perf-budget gates on alternating-leg medians; smoke runs after …
adhorodyski Nov 24, 2026
d370f4c
ci: official collector compliance
adhorodyski Nov 24, 2026
03d9715
ci: nightly matrix
adhorodyski Nov 24, 2026
8472399
ci(nightly): verify the podspec bump; never cancel a real nightly
adhorodyski Nov 24, 2026
abcaff0
fix(ios): drop the module-map phase's declared output (collides with …
adhorodyski Nov 24, 2026
e71c9b6
chore: release flow, migration guide and README for v0
adhorodyski Nov 24, 2026
fe8d5be
chore: release flow fixes (gates, promote, docs)
adhorodyski Nov 24, 2026
5153d04
ci: drop the temporary R28 pull_request dry-run triggers
adhorodyski Nov 24, 2026
6bece22
feat(expo): the Expo example uses the shipped config plugin
adhorodyski Nov 24, 2026
d802a38
fix(sdk): name the missing fields when a partial config cannot initia…
adhorodyski Nov 24, 2026
e3bd884
fix(android): accept underscore hosts in exportUrl like iOS and web
adhorodyski Nov 24, 2026
5900b3f
fix(web): validate exportConfig.url at init like native
adhorodyski Nov 24, 2026
827570d
fix(context): stampScope never throws on a tracer without instrumenta…
adhorodyski Nov 24, 2026
04c497f
fix(native): RNOtel.start logs a sticky init failure once, not on eve…
adhorodyski Nov 24, 2026
048d9d4
chore: ship react-native.config.js naming the adapter podspec
adhorodyski Nov 24, 2026
1533e67
fix(metro): throw on an unmerged config instead of dropping Initializ…
adhorodyski Nov 24, 2026
f98963b
docs: state the supported iOS platforms honestly; the probe logs an e…
adhorodyski Nov 24, 2026
6e75238
docs(verify): semantic-conventions bundle share; where CI's perf.json…
adhorodyski Nov 24, 2026
5145b0a
test(e2e): tolerate a slow CI simulator; bound the iOS log stream; st…
adhorodyski Nov 24, 2026
d29806b
ci: step timeouts on the e2e steps; bound the iOS log diagnosis
adhorodyski Nov 24, 2026
166eb41
chore(verify): drop the X9 JSON exception list (the Collector accepts…
adhorodyski Nov 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": true,
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
Expand Down
8 changes: 8 additions & 0 deletions .changeset/v0-tracing-rewrite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"react-native-open-telemetry": minor
---

v0: a rewrite around one trace across JS and native. Native-first init (`RNOtel.start` on Android and iOS) with a JS
fallback (`startReactNativeSdk`), a context patch that carries the active span through `await`, promises and timers,
and `withOtel` helpers for Metro and Vite. Removed (breaking): metrics, fetch instrumentation, session tagging and
the `openTelemetrySDK` init. See MIGRATION.md.
329 changes: 315 additions & 14 deletions .github/workflows/ci.yml

Large diffs are not rendered by default.

161 changes: 161 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
name: Release

# Two gates, both checked through the GitHub API by scripts/release-gate.js, which fails closed (red, pending, missing
# or an API error all stop the job):
# - publish-next: after CI completes on a `main` push, and only if that commit's CI is green. Changesets opens the
# "version packages" PR while changesets are pending; once it is merged (and CI is green on the merge), it runs
# `changeset publish --tag next` (npm publish --tag next). Nothing ever publishes to `latest` directly.
# - promote (manual, from `main`): moves a published version from `next` to `latest`, only if its release commit
# (tag v<version>) has a green `nightly` status from a successful scheduled.yml run (mark-nightly), and the version
# is not lower than the current `latest`. Run the nightly on that commit first if needed:
# Actions -> Nightly -> Run workflow -> "Use workflow from" tag v<version>.
# Both publishing jobs run in the `npm` environment, which holds NPM_TOKEN (a granular, publish-only token). Setup and
# caveats (the version PR gets no CI): CONTRIBUTING.md "Publishing to npm".
# Real publishing is first verified after merge to `main` (R28); until then only the dry run below has run (from the
# PR, Release run 45353782465).
on:
workflow_run:
workflows: [CI]
types: [completed]
branches: [main]
workflow_dispatch:
inputs:
promote:
description: 'Version to move from `next` to `latest` (e.g. 0.3.0). Empty: nothing to promote.'
type: string
default: ''
dry_run:
description: 'Dry run: evaluate the gates, version and pack; publish and promote nothing'
type: boolean
default: false

permissions:
contents: read

# per event: a dry run or a promote never queues behind or replaces a pending publish-next
concurrency:
group: release-${{ github.event_name }}
cancel-in-progress: false

env:
PACKAGE: react-native-open-telemetry
# A commit whose CI is red (a v0-impl PR run): the dry run proves the CI gate refuses it, live against the API.
KNOWN_RED_SHA: 78482b19a4537be8f05306744729b5a6db8b0d10
# A commit whose CI is green: the positive control, so the refusal above is not a gate that always fails.
KNOWN_GREEN_SHA: d6d1af161ea6a6a1ee587aa858304f3aa6f2e5b3

jobs:
dry-run:
if: github.event_name == 'workflow_dispatch' && inputs.dry_run
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: read
actions: read
statuses: read
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # all branches: changeset status compares against origin/main
- uses: actions/setup-node@v4
with:
node-version: '24'
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.2.19
- run: node scripts/release-gate.js --self-test
- name: The CI gate refuses a red commit and passes a green one
run: |
if node scripts/release-gate.js ci "$KNOWN_RED_SHA"; then echo "::error::CI gate passed a red commit"; exit 1; fi
node scripts/release-gate.js ci "$KNOWN_GREEN_SHA"
- name: The promote gate refuses a commit without a green nightly
run: |
if node scripts/release-gate.js nightly "$KNOWN_RED_SHA"; then echo "::error::nightly gate passed"; exit 1; fi
- run: bun install --frozen-lockfile
- run: bun run prepare
- run: bunx changeset status --verbose --since=origin/main
- name: Version (what the version PR would contain)
run: bun run version && git status --short && git diff -- package.json src/sdk/config.ts ios/RNOtel/RNOtel.swift
# `changeset publish` has no dry-run flag, so the dry run packs exactly what it would publish, with its dist-tag
- run: npm publish --dry-run --tag next --ignore-scripts

publish-next:
if: >-
github.event_name == 'workflow_run' && github.event.workflow_run.event == 'push' &&
github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
timeout-minutes: 30
environment: npm
permissions:
contents: write # the version PR branch and the v<version> tag
pull-requests: write # the version PR
actions: read # the CI gate
id-token: write # npm provenance
env:
SHA: ${{ github.event.workflow_run.head_sha }}
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_sha }}
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '24'
# the event says success; re-check through the API so a re-run or a stale event cannot publish a red commit
- run: node scripts/release-gate.js ci "$SHA"
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.2.19
- run: bun install --frozen-lockfile
- uses: changesets/action@v1
with:
version: bun run version
publish: bun run release
title: 'chore: version packages'
commit: 'chore: version packages'
createGithubReleases: false # `latest` is promote's call, not the publish's
env:
GITHUB_TOKEN: ${{ github.token }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: 'true'

promote:
if: >-
github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' &&
inputs.promote != '' && !inputs.dry_run
runs-on: ubuntu-latest
timeout-minutes: 10
environment: npm
permissions:
contents: read
statuses: read # the nightly gate: the status
actions: read # the nightly gate: the scheduled.yml run it links
env:
VERSION: ${{ inputs.promote }}
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '24'
registry-url: https://registry.npmjs.org
- name: Resolve the release commit
run: |
# x.y.z only: a prerelease never becomes `latest`, and sort -V orders plain versions correctly
[[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || { echo "::error::not a release version: $VERSION"; exit 1; }
sha=$(git rev-list -n 1 "v$VERSION") # fails the step when the tag is missing
echo "SHA=$sha" >> "$GITHUB_ENV"
test "$(npm view "$PACKAGE@$VERSION" version)" = "$VERSION"
latest=$(npm view "$PACKAGE" dist-tags.latest)
if [ "$(printf '%s\n' "$latest" "$VERSION" | sort -V | tail -n 1)" != "$VERSION" ]; then
echo "::error::$VERSION is lower than latest $latest"; exit 1
fi
- run: node scripts/release-gate.js nightly "$SHA"
- run: npm dist-tag add "$PACKAGE@$VERSION" latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
207 changes: 207 additions & 0 deletions .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
name: Nightly

# Spec §9.4/§9.5 (Task 31). Setup steps follow ci.yml; no native caches here: every nightly build is from scratch.
# `schedule` and `workflow_dispatch` only run workflow files from the default branch (main), so the real schedule is
# first verified after merge to main (R28). On success, `mark-nightly` marks the commit with a `nightly` status.
on:
schedule:
- cron: '0 2 * * *'
workflow_dispatch:
inputs:
dry_run:
description: 'Dry run: setup, app regeneration and packing only (no builds, no devices, no status)'
type: boolean
default: false

permissions:
contents: read

concurrency:
group: nightly-${{ github.ref }}
cancel-in-progress: false # never cancel a real nightly

env:
E2E_TELEMETRY_DISABLED: '1'
DRY_RUN: ${{ inputs.dry_run == true }}

jobs:
e2e:
name: ${{ matrix.name }}
runs-on: ${{ matrix.platform == 'ios' && 'xcode-27' || 'ubuntu-latest' }}
timeout-minutes: 90
continue-on-error: ${{ matrix.experimental == true }}
strategy:
fail-fast: false
matrix:
# platform: android | ios. app: bare (example/, default) | expo (example-expo/).
# mode: e2e (Release, test mode, every scenario) | smoke (Release, test mode off, smoke-device) |
# dev (Debug + Metro, test mode, fast-refresh-idempotent).
# rn: regenerate example/ from the RN template at that version (verify/nightly/app.sh bare, X13).
# deps: @opentelemetry/*, otel-java (BOM) and opentelemetry-swift at their latest, plus the fast loop.
# pack: npm pack, install the tarball into that app instead of linking the source tree (app.sh pack).
include:
# oldest supported (peer range >=0.79) and newest React Native
- {name: rn-0.79-android, platform: android, rn: '0.79', mode: e2e}
# experimental (AUTHOR GATE, VERIFY.md "Nightly"): RN 0.79.7 iOS does not build on Xcode 27 (locally: the
# adapter podspec's module-map script phase collides with CocoaPods' own, then RN 0.79's fmt pod fails on
# consteval). Fix both or raise the minimum RN, then drop the flag.
- {name: rn-0.79-ios, platform: ios, rn: '0.79', mode: e2e, experimental: true}
- {name: rn-latest-android, platform: android, rn: latest, mode: e2e}
- {name: rn-latest-ios, platform: ios, rn: latest, mode: e2e}
- {name: deps-latest-android, platform: android, deps: true, mode: e2e}
- {name: deps-latest-ios, platform: ios, deps: true, mode: e2e}
# the published package: a fresh bare app (template at latest) and the Expo app (prebuild --clean), test mode
# off. The Expo entries are also the Expo smoke-device run (X11 interim: bare per PR, Expo here).
- {name: pack-bare-android, platform: android, rn: latest, pack: example, mode: smoke}
- {name: pack-bare-ios, platform: ios, rn: latest, pack: example, mode: smoke}
- {name: pack-expo-android, platform: android, app: expo, pack: example-expo, mode: smoke}
- {name: pack-expo-ios, platform: ios, app: expo, pack: example-expo, mode: smoke}
# Android process-name fallback below API 28 (/proc/self/cmdline, Task 24): native init must still run
- {name: api26-android-smoke, platform: android, api: 26, mode: smoke}
# fast-refresh-idempotent needs Debug builds and Metro, so it is not per PR (Task 27)
- {name: dev-android, platform: android, mode: dev}
- {name: dev-ios, platform: ios, mode: dev}
env:
APP_DIR: ${{ matrix.app == 'expo' && 'example-expo' || 'example' }}
SCHEME: ${{ matrix.app == 'expo' && 'OpenTelemetryExpo' || 'OpenTelemetryExample' }}
CONFIGURATION: ${{ matrix.mode == 'dev' && 'Debug' || 'Release' }}
OTEL_TEST_MODE: ${{ matrix.mode != 'smoke' && '1' || '' }}
E2E_SMOKE: ${{ matrix.mode == 'smoke' && '1' || '' }}
E2E_DEV: ${{ matrix.mode == 'dev' && '1' || '' }}
E2E_TARGET: ${{ format('{0}-{1}', matrix.platform, matrix.mode == 'dev' && 'dev' || matrix.app == 'expo' && 'expo' || 'bare') }}
AGENT_DEVICE_DAEMON_STARTUP_TIMEOUT_MS: '600000' # the first daemon start on a cold runner outlasts the default
steps:
- uses: actions/checkout@v4
- if: matrix.platform == 'ios'
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '27.0'
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.2.19
- uses: actions/setup-node@v4 # npm view / npm pack / the RN CLI in verify/nightly/app.sh
with:
node-version: '24'
- if: matrix.platform == 'android'
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'

- name: Bump @opentelemetry/*, otel-java and opentelemetry-swift to latest
if: matrix.deps
run: |
jq -r '.dependencies | keys[] | select(startswith("@opentelemetry/")) + "@latest"' package.json | xargs bun add
java=$(curl -fsSL https://repo1.maven.org/maven2/io/opentelemetry/opentelemetry-bom/maven-metadata.xml |
sed -n 's:.*<release>\(.*\)</release>.*:\1:p')
perl -pi -e "s/opentelemetry-bom:[\d.]+/opentelemetry-bom:$java/" android/build.gradle android/core-jvm/build.gradle.kts
for repo in opentelemetry-swift opentelemetry-swift-core; do
v=$(git ls-remote --tags --refs "https://github.com/open-telemetry/$repo" | sed 's:.*/::; s/^v//' |
grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -1)
perl -0pi -e "s|($repo\", \.upToNextMinor\(from: \")[\d.]+|\${1}$v|" Package.swift
perl -0pi -e "s|($repo',\s*requirement: \{ kind: 'upToNextMinorVersion', minimumVersion: ')[\d.]+|\${1}$v|" \
ReactNativeOpenTelemetryCore.podspec
grep -qF "$repo\", .upToNextMinor(from: \"$v\")" Package.swift || { echo "::error::Package.swift: $repo not bumped"; exit 1; }
grep -qF "minimumVersion: '$v'" ReactNativeOpenTelemetryCore.podspec || { echo "::error::podspec: $repo not bumped"; exit 1; }
done
# resolve the bumped Swift packages afresh
rm -f example/ios/OpenTelemetryExample.xcworkspace/xcshareddata/swiftpm/Package.resolved
git diff -- package.json android/build.gradle android/core-jvm/build.gradle.kts Package.swift '*.podspec'
- run: bun install --frozen-lockfile
- name: Regenerate example/ at React Native ${{ matrix.rn }}
if: matrix.rn
run: verify/nightly/app.sh bare '${{ matrix.rn }}'
- name: Install ${{ env.APP_DIR }}
working-directory: ${{ env.APP_DIR }}
run: bun install ${{ !matrix.rn && '--frozen-lockfile' || '' }}
- run: bun run prepare # the apps bundle the package through exports -> lib/ (R4)
- name: npm pack into ${{ matrix.pack }}
if: matrix.pack
run: verify/nightly/app.sh pack '${{ matrix.pack }}'
- name: Fast loop
if: matrix.deps && env.DRY_RUN != 'true'
# every non-e2e stage on Linux (fast-swift skips there); fast-swift on macOS
run: bun verify ${{ matrix.platform == 'ios' && 'fast-swift' || '' }}
- name: expo prebuild
if: matrix.app == 'expo'
working-directory: example-expo
run: bunx expo prebuild --clean --no-install --platform ${{ matrix.platform }}

- name: Build (${{ env.CONFIGURATION }})
if: env.DRY_RUN != 'true'
run: |
if [ '${{ matrix.platform }}' = android ]; then
cd "$APP_DIR/android"
args=(":app:assemble$CONFIGURATION" -PreactNativeArchitectures=x86_64 ${OTEL_TEST_MODE:+-PotelTestMode=true})
./gradlew "${args[@]}" || ./gradlew "${args[@]}" # one retry: plugin and NDK downloads fail transiently
else
cd "$APP_DIR/ios"
pod install # OTEL_TEST_MODE (job env) adds the Swift compilation condition
xcodebuild -workspace "$SCHEME.xcworkspace" -scheme "$SCHEME" -configuration "$CONFIGURATION" \
-sdk iphonesimulator -destination 'generic/platform=iOS Simulator' -derivedDataPath build ARCHS=arm64 build
fi
- name: Start Metro (dev builds load their bundle from it)
if: matrix.mode == 'dev' && env.DRY_RUN != 'true'
working-directory: example
run: nohup bunx react-native start > "$RUNNER_TEMP/metro.log" 2>&1 &

- name: Enable KVM
if: matrix.platform == 'android' && env.DRY_RUN != 'true'
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: e2e (${{ env.E2E_TARGET }})
if: matrix.platform == 'android' && env.DRY_RUN != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api || 35 }}
arch: x86_64
target: google_apis
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
# each line runs in its own shell
script: |
adb shell settings put global hide_error_dialogs 1
adb reverse tcp:8081 tcp:8081
if [ "$E2E_DEV" = 1 ]; then bunx e2e run --config verify/e2e/e2e.config.ts --target "$E2E_TARGET" fast-refresh-idempotent; else bun verify --e2e e2e; fi
- name: Pre-boot the simulator (a cold boot on the runner outlasts agent-device's boot timeout)
if: matrix.platform == 'ios' && env.DRY_RUN != 'true'
run: |
udid=$(xcrun simctl list devices available -j | jq -r '[.devices[][] | select(.name | startswith("iPhone"))][0].udid')
xcrun simctl boot "$udid"
xcrun simctl bootstatus "$udid" -b
- name: e2e (${{ env.E2E_TARGET }})
if: matrix.platform == 'ios' && env.DRY_RUN != 'true'
run: |
if [ "$E2E_DEV" = 1 ]; then bunx e2e run --config verify/e2e/e2e.config.ts --target "$E2E_TARGET" fast-refresh-idempotent; else bun verify --e2e e2e; fi

- name: Metro log
if: failure() && matrix.mode == 'dev'
run: tail -100 "$RUNNER_TEMP/metro.log" || true
- uses: actions/upload-artifact@v4
if: always()
with:
name: nightly-${{ matrix.name }}
path: |
verify/artifacts/
verify/e2e/.e2e/
if-no-files-found: ignore
include-hidden-files: true # verify/e2e/.e2e is a dot dir

# Marks the commit for the release gate (Task 32). A matrix entry with `experimental: true` does not block it.
mark-nightly:
needs: [e2e]
if: ${{ !inputs.dry_run }}
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
statuses: write
steps:
- name: Mark the commit with the `nightly` status
env:
GH_TOKEN: ${{ github.token }}
run: >
gh api 'repos/${{ github.repository }}/statuses/${{ github.sha }}'
-f state=success -f context=nightly -f description='Nightly matrix passed'
-f target_url='${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'
Loading
Loading