You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: create a clean "native coverage upload" failed signal in CI
native coverage was still failing to upload correctly, and it was a silent
false positive
this doesn't enforce a specific level of native coverage but enforces that it
is correctly collected and uploaded - that the plumbing + system is working
2.`yarn tests:android:post-e2e-coverage` — poll/pull `coverage.ec`, Jacoco report (best-effort, never fails the job)
7
-
3. Codecov upload — `continue-on-error: true`
7
+
3.**Codecov upload** — two flagged uploads (`e2e-ts-android`, `android-native`); `continue-on-error: true` on the action steps. **`codecov/project/android-native`** fails if the native flag upload is missing (see [coverage design](../testing/coverage-design.md#native-upload-gates)).
8
8
9
9
Native Android coverage is **not** pulled inside `tests/e2e/firebase.test.js`. The Jet `after` hook in `tests/app.js` calls `RNFBTestingCoverage.flush()` in the **app process** to write `coverage.ec` before Detox SIGINTs instrumentation. Post-e2e pull runs after Detox exits.
10
10
@@ -50,3 +50,4 @@ Full inventory: [detox-patches.md](detox-patches.md).
50
50
| Empty Jacoco XML (~235 bytes) | No `.ec` pulled — check post-e2e logs |
51
51
|`adb reverse --remove` in Detox logs | Expected on 1006; should be warn-only after Detox patch |
52
52
| Detox red, tests green in log | Pre-patch: teardown adb error; re-run or check patch applied |
53
+
|`codecov/project/android-native` fail | Jacoco XML not uploaded — check post-e2e logs and Codecov Uploads tab for `android-native` flag |
Copy file name to clipboardExpand all lines: okf-bundle/ci-workflows/ios.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,6 +85,10 @@ A long gap with only `com.apple.datamigrator` activity and no `com.invertase.tes
85
85
86
86
Device type is defined in `tests/.detoxrc.js` (`devices.simulator.device.type`). The boot script and Detox both use this name. CI does not hard-code a UDID.
87
87
88
+
### Codecov (debug matrix only)
89
+
90
+
After Detox, the debug leg runs `yarn tests:ios:test:process-coverage` then two flagged Codecov uploads (`e2e-ts-ios`, `ios-native`). **`codecov/project/ios-native`** blocks if the native flag upload is missing. Release legs skip coverage. Details: [coverage design](../testing/coverage-design.md#codecov-uploads-ci).
91
+
88
92
### E2E test app orchestration (Detox + Jet)
89
93
90
94
After pre-boot succeeds, failures often move **inside** the test app process (`com.invertase.testing`, binary `testing`). Simulator boot and app install are fine; Detox `launchApp` stalls while the app stays alive. Several overlapping issues show up in CI logs.
|`ready action too early` in Detox step only | Early-ready race (patch should fix; check patch applied in `yarn install`) |
208
-
|`ECOMPROMISED` / `Unable to update lock within the stale threshold`| Device registry lock heartbeat missed — see [detox-patches.md](detox-patches.md); check `ExclusiveLockfile.js` patch |
212
+
|`ECOMPROMISED` / `Unable to update lock within the stale threshold`| Device registry lock heartbeat missed — see [detox-patches.md](detox-patches.md)|
213
+
|`codecov/project/ios-native` fail | Native lcov not uploaded — check process-coverage step and Codecov Uploads tab for `ios-native` flag |
209
214
|`waitForActive` without `waitForActiveDone`| Scene/active hang (issue 4) **or** Metro/JS load failure (issue 5) — check `[rnfb-lifecycle]` probes |
210
215
|`probe+30s` / `probe+60s` with `UIApplication.state=inactive` or scene `unattached`| App never became foreground-active (issue 4); compare with SpringBoard `foreground-interactive` lines |
211
216
|`probe+30s` / `probe+60s` with `active` / `foregroundActive` but no `waitForActiveDone`| Metro/JS bundle failure despite active UIKit (issue 5); check `RCTJavaScriptDidFailToLoad` and `packager-status-fetch`|
Copy file name to clipboardExpand all lines: okf-bundle/testing/coverage-design.md
+38-11Lines changed: 38 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -161,22 +161,48 @@ The Podfile `post_install` coverage flags are temporary. When native dependencie
161
161
162
162
# Codecov uploads (CI)
163
163
164
-
CI uses [codecov-action](https://github.com/codecov/codecov-action) v7 with `verbose: true`. It auto-discovers coverage files under the repo, including:
164
+
CI uses [codecov-action](https://github.com/codecov/codecov-action) v7 with explicit `files` and `flags` per upload (no auto-discovery for gated artifacts). Workflow steps use `continue-on-error: true` so a Codecov API hiccup does not fail the test job; **blocking gates** are the Codecov GitHub status checks configured in `codecov.yml`.
The iOS workflow runs `yarn tests:ios:test:process-coverage` after Detox (`if: always()`, `continue-on-error: true` for now). The process step exits 1 when profraw is missing.
168
+
Flag names are defined in **`codecov.yml`** (`flag_management`) and must match **`flags:`** in the workflow step. Do not rename in one place without the other.
169
+
170
+
| Flag | Workflow | File uploaded | Blocks PR? |
171
+
|------|----------|---------------|------------|
172
+
|`jest`|`tests_jest.yml`|`coverage/lcov.info`| No |
173
+
|`e2e-ts-ios`|`tests_e2e_ios.yml` (debug only) |`coverage/lcov.info`| No |
|`e2e-ts-macos`|`tests_e2e_other.yml`|`coverage/lcov.info`| No |
178
+
179
+
iOS **release** matrix legs do not upload coverage. macOS e2e has TS coverage only (no native gate).
180
+
181
+
## Native upload gates
182
+
183
+
Blocking flags use `carryforward: false` and `target: 1%` in `codecov.yml`:
184
+
185
+
-**Upload present** with any reasonable native coverage → flag status **passes** (well above 1%).
186
+
-**Upload missing** (file not produced, step skipped, or upload failed) → flag has **0%** → status **fails**.
187
+
188
+
This gates **upload presence**, not native coverage percentage regressions. Overall `codecov/project` remains `informational: true`.
189
+
190
+
PR comments include a **flags** table (`comment.layout: …, flags`).
191
+
192
+
## Per-workflow artifacts
193
+
194
+
| Workflow | Steps before Codecov |
195
+
|----------|---------------------|
196
+
|`tests_jest.yml`|`yarn tests:jest-coverage`|
197
+
|`tests_e2e_ios.yml` (debug) | Detox → `yarn tests:ios:test:process-coverage` (`continue-on-error: true` on process step for now) |
198
+
|`tests_e2e_android.yml`| Detox → `yarn tests:android:post-e2e-coverage` (soft-fail poll/pull in script) |
199
+
|`tests_e2e_other.yml`| macOS Jet e2e |
174
200
175
201
## File naming
176
202
177
-
The repo standard for JavaScript lcov is **`coverage/lcov.info`**. iOS native lcov is **`coverage/ios-native/lcov.info`**— the basename `lcov.info`is required for codecov-action auto-discovery (files like `ios-native.lcov.info` are not matched). Android native coverage is **Jacoco XML**, not lcov; codecov discovers `jacoco*.xml` once the report is generated.
203
+
JavaScript lcov: **`coverage/lcov.info`**. iOS native lcov: **`coverage/ios-native/lcov.info`**(basename `lcov.info` required). Android native: **Jacoco XML** at the path in the table above after `jacocoAndroidTestReport`.
178
204
179
-
Check the Codecov commit **Uploads** tab for **Processed** vs **Unusable**per upload — that is the authoritative signal, not small project percentage deltas.
205
+
Check the Codecov commit **Uploads** tab: each flag should appear as **Processed**. **Unusable**means wrong format or paths — fix before relying on the gate.
180
206
181
207
# Local iteration
182
208
@@ -231,8 +257,9 @@ These must all be true for native coverage to work. If any break, the e2e test s
231
257
| iOS link: `swiftCompatibility56` undefined | Profile link flags applied to all Pods | Restrict `OTHER_LDFLAGS` profile flags to app target; RNFB pods compile-only |
232
258
| No `[jet-coverage] WS received` lines | Patches not applied |`yarn install` from repo root; check `.yarn/patches/`|
233
259
| NYC summary missing / empty `lcov.info`| Jet not run from `tests/` cwd | Detox spawns `yarn jet` inside `tests/`; macOS uses `cd tests && npx jet`|
234
-
| Codecov missing iOS native files | Output not named `lcov.info`| Use `coverage/ios-native/lcov.info` (not `coverage/ios-native.lcov.info`)|
260
+
| Codecov missing iOS native files | Output not named `lcov.info`or wrong path | Use `coverage/ios-native/lcov.info`; confirm `ios-native` flag upload in iOS debug workflow|
0 commit comments