| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 70a5b9b commit 2ea6816
9 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,19 +26,19 @@ jobs: | |||
| 26 | 26 | needs: coverage | |
| 27 | 27 | runs-on: ubuntu-latest | |
| 28 | 28 | timeout-minutes: 30 | |
| 29 | - # GitHub-hosted Android emulators grow unstable after ~15 minutes of | ||
| 30 | - # sustained Maestro driving and start reporting "device offline" / | ||
| 31 | - # "device not found" mid-run (the emulator VM, not the app, dies). | ||
| 32 | - # The full suite reliably crosses that threshold around the ~35th | ||
| 33 | - # flow. Sharding the run into a few balanced groups, each on its | ||
| 34 | - # own freshly booted emulator, keeps every session well under the | ||
| 29 | + # GitHub-hosted Android emulators grow unstable after roughly ten | ||
| 30 | + # minutes of sustained Maestro driving and start reporting "device | ||
| 31 | + # offline" / "device not found" mid-run (the emulator VM, not the | ||
| 32 | + # app, dies). Sharding the run into a few balanced groups, each on | ||
| 33 | + # its own freshly booted emulator, keeps every session under the | ||
| 35 | 34 | # limit, and parallelizes the Android pass as a bonus. Groups are | |
| 36 | - # sized so none exceeds ~15 flows; ``components`` (28 flows after | ||
| 37 | - # the gesture/animated additions) crossed the ceiling at ~flow 26, | ||
| 38 | - # so it runs as two halves, and ``hooks`` (22 flows after the async | ||
| 39 | - # hook additions) now takes ~10 minutes of driving on its own, so | ||
| 40 | - # it gets a dedicated emulator. ``fail-fast: false`` so one shard's | ||
| 41 | - # failure still lets the others report. | ||
| 35 | + # sized so none exceeds ~12 heavy flows: ``components`` (35 flows | ||
| 36 | + # after the graphics additions) dropped offline at ~11.5 minutes | ||
| 37 | + # when split in two, so it runs as three parts; ``hooks`` (23 quick | ||
| 38 | + # flows, ~10 minutes of driving) gets a dedicated emulator; the | ||
| 39 | + # remaining categories are grouped to similar totals. | ||
| 40 | + # ``fail-fast: false`` so one shard's failure still lets the others | ||
| 41 | + # report. | ||
| 42 | 42 | strategy: | |
| 43 | 43 | fail-fast: false | |
| 44 | 44 | matrix: | |
@@ -47,6 +47,8 @@ jobs: | |||
| 47 | 47 | suites: components-a | |
| 48 | 48 | - name: components-b | |
| 49 | 49 | suites: components-b | |
| 50 | + - name: components-c | ||
| 51 | + suites: components-c | ||
| 50 | 52 | - name: hooks | |
| 51 | 53 | suites: hooks | |
| 52 | 54 | - name: nav-gestures-layout-styling | |
@@ -162,6 +164,8 @@ jobs: | |||
| 162 | 164 | suites: components-a | |
| 163 | 165 | - name: components-b | |
| 164 | 166 | suites: components-b | |
| 167 | + - name: components-c | ||
| 168 | + suites: components-c | ||
| 165 | 169 | - name: hooks | |
| 166 | 170 | suites: hooks | |
| 167 | 171 | - name: nav-gestures-layout-styling | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -100,12 +100,12 @@ for suite in "${SUITES[@]}"; do | |||
| 100 | 100 | MAESTRO_TARGETS+=("tests/e2e/ios.yaml") | |
| 101 | 101 | fi | |
| 102 | 102 | ;; | |
| 103 | - components|components-a|components-b|hooks|navigation|layout|styling|animations|gestures|assets|misc) | ||
| 103 | + components|components-a|components-b|components-c|hooks|navigation|layout|styling|animations|gestures|assets|misc) | ||
| 104 | 104 | MAESTRO_TARGETS+=("tests/e2e/suites/${suite}.yaml") | |
| 105 | 105 | ;; | |
| 106 | 106 | *) | |
| 107 | 107 | echo "Error: unknown suite '$suite'" >&2 | |
| 108 | - echo "Available suites: full, components, components-a, components-b, hooks, navigation, layout, styling, animations, gestures, assets, misc" >&2 | ||
| 108 | + echo "Available suites: full, components, components-a, components-b, components-c, hooks, navigation, layout, styling, animations, gestures, assets, misc" >&2 | ||
| 109 | 109 | exit 2 | |
| 110 | 110 | ;; | |
| 111 | 111 | esac | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -471,18 +471,54 @@ def _bundled_roots(*, exclude: Optional[str]) -> List[Path]: | |||
| 471 | 471 | ||
| 472 | 472 | ||
| 473 | 473 | def font_faces() -> Tuple[FontFace, ...]: | |
| 474 | - """The font faces available from every readable assets root.""" | ||
| 474 | + """The font faces bundled with the app. | ||
| 475 | + | ||
| 476 | + Readable roots (the dev overlay, a checkout, the iOS bundle) are | ||
| 477 | + scanned directly. On Android the bundled ``app/assets/`` lives inside | ||
| 478 | + the APK rather than on disk, so its faces come from the manifest the | ||
| 479 | + build wrote, read through the native ``Assets`` module. | ||
| 480 | + """ | ||
| 475 | 481 | faces: List[FontFace] = [] | |
| 476 | 482 | seen = set() | |
| 483 | + | ||
| 484 | + def add(face: FontFace) -> None: | ||
| 485 | + key = (face.family.lower(), face.weight, face.italic) | ||
| 486 | + if key not in seen: | ||
| 487 | + seen.add(key) | ||
| 488 | + faces.append(face) | ||
| 489 | + | ||
| 477 | 490 | for root in assets_roots(): | |
| 478 | 491 | for face in scan(root).fonts: | |
| 479 | - key = (face.family.lower(), face.weight, face.italic) | ||
| 480 | - if key not in seen: | ||
| 481 | - seen.add(key) | ||
| 482 | - faces.append(face) | ||
| 492 | + add(face) | ||
| 493 | + if not _bundled_roots(exclude=None): | ||
| 494 | + for face in _native_manifest().fonts: | ||
| 495 | + add(face) | ||
| 483 | 496 | return tuple(faces) | |
| 484 | 497 | ||
| 485 | 498 | ||
| 499 | + def _native_manifest() -> AssetManifest: | ||
| 500 | + """The bundled manifest as the native runtime sees it, or an empty one. | ||
| 501 | + | ||
| 502 | + Used when the bundle isn't a directory Python can list (Android). | ||
| 503 | + """ | ||
| 504 | + from ..bridge import has_transport | ||
| 505 | + | ||
| 506 | + if not has_transport(): | ||
| 507 | + return AssetManifest() | ||
| 508 | + from ..native_modules.registry import NativeModuleError, native_module | ||
| 509 | + | ||
| 510 | + try: | ||
| 511 | + encoded = native_module("Assets").call("read", path=MANIFEST_NAME) | ||
| 512 | + except NativeModuleError: | ||
| 513 | + return AssetManifest() | ||
| 514 | + if not encoded: | ||
| 515 | + return AssetManifest() | ||
| 516 | + try: | ||
| 517 | + return AssetManifest.from_dict(json.loads(base64.b64decode(encoded))) | ||
| 518 | + except (ValueError, KeyError, TypeError): | ||
| 519 | + return AssetManifest() | ||
| 520 | + | ||
| 521 | + | ||
| 486 | 522 | # ---------------------------------------------------------------------- | |
| 487 | 523 | # Dev-time coordination with the native runtime | |
| 488 | 524 | # ---------------------------------------------------------------------- | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -73,7 +73,7 @@ scripts/ | |||
| 73 | 73 | ./scripts/run-e2e.sh ios components | |
| 74 | 74 | ``` | |
| 75 | 75 | ||
| 76 | - Available category suites: `components`, `hooks`, `navigation`, `layout`, `styling`, `animations`, `gestures`, `assets`, `misc`. The components category also has `components-a` / `components-b` halves: CI's Android shards use them because a GitHub-hosted emulator session degrades and drops offline before all 28 component flows finish in one run (`components.yaml` just chains the two halves). | ||
| 76 | + Available category suites: `components`, `hooks`, `navigation`, `layout`, `styling`, `animations`, `gestures`, `assets`, `misc`. The components category also has `components-a` / `components-b` / `components-c` parts: CI's Android shards use them because a GitHub-hosted emulator session degrades and drops offline before all 35 component flows finish in one run (`components.yaml` just chains the three parts). | ||
| 77 | 77 | ||
| 78 | 78 | You can also run a single flow directly. Useful when iterating on one demo: | |
| 79 | 79 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,10 +1,10 @@ | |||
| 1 | - # Component category suite, first half (A); see components.yaml. | ||
| 1 | + # Component category suite, part 1 of three; see components.yaml. | ||
| 2 | 2 | # | |
| 3 | - # The components category is large enough (28 flows) that a single | ||
| 3 | + # The components category is large enough (35 flows) that a single | ||
| 4 | 4 | # GitHub-hosted Android emulator session can't reliably finish it: the | |
| 5 | - # emulator grows unstable after ~15 minutes of sustained Maestro | ||
| 6 | - # driving and drops offline around the ~26th flow. CI therefore runs | ||
| 7 | - # the category as two halves, each on a freshly booted emulator. | ||
| 5 | + # emulator grows unstable after roughly ten minutes of sustained Maestro | ||
| 6 | + # driving and drops offline mid-flow. CI therefore runs the category as | ||
| 7 | + # three parts of about twelve flows, each on a freshly booted emulator. | ||
| 8 | 8 | # | |
| 9 | 9 | # Usage: | |
| 10 | 10 | # maestro test tests/e2e/suites/components-a.yaml -e APP_ID=com.pythonnative.e2e | |
@@ -22,7 +22,3 @@ appId: ${APP_ID} | |||
| 22 | 22 | - runFlow: ../flows/components/activity_indicator.yaml | |
| 23 | 23 | - runFlow: ../flows/components/view_column_row.yaml | |
| 24 | 24 | - runFlow: ../flows/components/scroll_view.yaml | |
| 25 | - - runFlow: ../flows/components/safe_area_view.yaml | ||
| 26 | - - runFlow: ../flows/components/modal.yaml | ||
| 27 | - - runFlow: ../flows/components/pressable.yaml | ||
| 28 | - - runFlow: ../flows/components/picker.yaml | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,15 +1,19 @@ | |||
| 1 | - # Component category suite, second half (B); see components.yaml. | ||
| 1 | + # Component category suite, part 2 of three; see components.yaml. | ||
| 2 | 2 | # | |
| 3 | - # The components category is large enough (28 flows) that a single | ||
| 3 | + # The components category is large enough (35 flows) that a single | ||
| 4 | 4 | # GitHub-hosted Android emulator session can't reliably finish it: the | |
| 5 | - # emulator grows unstable after ~15 minutes of sustained Maestro | ||
| 6 | - # driving and drops offline around the ~26th flow. CI therefore runs | ||
| 7 | - # the category as two halves, each on a freshly booted emulator. | ||
| 5 | + # emulator grows unstable after roughly ten minutes of sustained Maestro | ||
| 6 | + # driving and drops offline mid-flow. CI therefore runs the category as | ||
| 7 | + # three parts of about twelve flows, each on a freshly booted emulator. | ||
| 8 | 8 | # | |
| 9 | 9 | # Usage: | |
| 10 | 10 | # maestro test tests/e2e/suites/components-b.yaml -e APP_ID=com.pythonnative.e2e | |
| 11 | 11 | appId: ${APP_ID} | |
| 12 | 12 | --- | |
| 13 | + - runFlow: ../flows/components/safe_area_view.yaml | ||
| 14 | + - runFlow: ../flows/components/modal.yaml | ||
| 15 | + - runFlow: ../flows/components/pressable.yaml | ||
| 16 | + - runFlow: ../flows/components/picker.yaml | ||
| 13 | 17 | - runFlow: ../flows/components/refresh_control.yaml | |
| 14 | 18 | - runFlow: ../flows/components/fragment.yaml | |
| 15 | 19 | - runFlow: ../flows/components/portal.yaml | |
@@ -18,14 +22,3 @@ appId: ${APP_ID} | |||
| 18 | 22 | - runFlow: ../flows/components/status_bar.yaml | |
| 19 | 23 | - runFlow: ../flows/components/keyboard_avoiding_view.yaml | |
| 20 | 24 | - runFlow: ../flows/components/flat_list.yaml | |
| 21 | - - runFlow: ../flows/components/section_list.yaml | ||
| 22 | - - runFlow: ../flows/components/web_view.yaml | ||
| 23 | - - runFlow: ../flows/components/touchable_opacity.yaml | ||
| 24 | - - runFlow: ../flows/components/image_background.yaml | ||
| 25 | - - runFlow: ../flows/components/linear_gradient.yaml | ||
| 26 | - - runFlow: ../flows/components/blur_view.yaml | ||
| 27 | - - runFlow: ../flows/components/checkbox.yaml | ||
| 28 | - - runFlow: ../flows/components/segmented_control.yaml | ||
| 29 | - - runFlow: ../flows/components/date_picker.yaml | ||
| 30 | - - runFlow: ../flows/components/suspense.yaml | ||
| 31 | - - runFlow: ../flows/components/lazy.yaml | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,23 @@ | |||
| 1 | + # Component category suite, part 3 of three; see components.yaml. | ||
| 2 | + # | ||
| 3 | + # The components category is large enough (35 flows) that a single | ||
| 4 | + # GitHub-hosted Android emulator session can't reliably finish it: the | ||
| 5 | + # emulator grows unstable after roughly ten minutes of sustained Maestro | ||
| 6 | + # driving and drops offline mid-flow. CI therefore runs the category as | ||
| 7 | + # three parts of about twelve flows, each on a freshly booted emulator. | ||
| 8 | + # | ||
| 9 | + # Usage: | ||
| 10 | + # maestro test tests/e2e/suites/components-c.yaml -e APP_ID=com.pythonnative.e2e | ||
| 11 | + appId: ${APP_ID} | ||
| 12 | + --- | ||
| 13 | + - runFlow: ../flows/components/section_list.yaml | ||
| 14 | + - runFlow: ../flows/components/web_view.yaml | ||
| 15 | + - runFlow: ../flows/components/touchable_opacity.yaml | ||
| 16 | + - runFlow: ../flows/components/image_background.yaml | ||
| 17 | + - runFlow: ../flows/components/linear_gradient.yaml | ||
| 18 | + - runFlow: ../flows/components/blur_view.yaml | ||
| 19 | + - runFlow: ../flows/components/checkbox.yaml | ||
| 20 | + - runFlow: ../flows/components/segmented_control.yaml | ||
| 21 | + - runFlow: ../flows/components/date_picker.yaml | ||
| 22 | + - runFlow: ../flows/components/suspense.yaml | ||
| 23 | + - runFlow: ../flows/components/lazy.yaml | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,12 +6,13 @@ | |||
| 6 | 6 | # Useful for AI agents iterating on a component fix: only the relevant | |
| 7 | 7 | # flows run, keeping the feedback loop tight. | |
| 8 | 8 | # | |
| 9 | - # The flow list lives in components-a.yaml and components-b.yaml; this | ||
| 10 | - # file just chains the halves. CI runs the halves as separate Android | ||
| 11 | - # shards (a GitHub-hosted emulator can't survive all 28 flows in one | ||
| 12 | - # session; see the half files), while iOS simulators and local runs | ||
| 13 | - # can use this aggregate directly. | ||
| 9 | + # The flow list lives in components-a.yaml, components-b.yaml, and | ||
| 10 | + # components-c.yaml; this file just chains the parts. CI runs the parts | ||
| 11 | + # as separate Android shards (a GitHub-hosted emulator can't survive all | ||
| 12 | + # 35 flows in one session; see the part files), while iOS simulators and | ||
| 13 | + # local runs can use this aggregate directly. | ||
| 14 | 14 | appId: ${APP_ID} | |
| 15 | 15 | --- | |
| 16 | 16 | - runFlow: components-a.yaml | |
| 17 | 17 | - runFlow: components-b.yaml | |
| 18 | + - runFlow: components-c.yaml | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments