Skip to content

Commit 1ec02ad

Browse files
committed
chore: verify native-first configuration and its regression tests
1 parent a036f9d commit 1ec02ad

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Verify native-first configuration
2+
on:
3+
push:
4+
branches: [feat/native-host-update-api]
5+
paths: [.github/workflows/native-configuration-finalize.yml]
6+
permissions:
7+
contents: write
8+
jobs:
9+
verify:
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 5
12+
steps:
13+
- uses: actions/checkout@v7
14+
- uses: oven-sh/setup-bun@v2
15+
with:
16+
bun-version: 1.4.0
17+
- name: Apply guarded follow-ups
18+
run: |
19+
python3 scripts/finalize-native-configuration.py
20+
python3 - <<'PY'
21+
from pathlib import Path
22+
p = Path('ios/RCTPushy/RCTPushyNativeConfig.mm')
23+
s = p.read_text()
24+
old = 'if (CFGetTypeID((__bridge CFTypeRef)disabled) != CFBooleanGetTypeID()) {'
25+
assert s.count(old) == 1
26+
p.write_text(s.replace(old, 'if (![disabled isKindOfClass:NSNumber.class] || CFGetTypeID((__bridge CFTypeRef)disabled) != CFBooleanGetTypeID()) {'))
27+
PY
28+
- name: Validate tests and types
29+
run: |
30+
bun install --frozen-lockfile
31+
bunx biome check --write src
32+
bunx tsc --noEmit
33+
bun test src/__tests__
34+
git diff --check
35+
- name: Commit verified changes
36+
run: |
37+
git config user.name 'github-actions[bot]'
38+
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
39+
git add android/src/main/java/cn/reactnative/modules/update/{UpdateContext,NativeCheckOrchestrator}.java ios/RCTPushy/{RCTPushy.mm,RCTPushyNativeConfig.mm} harmony/pushy/src/main/ets/{UpdateContext,NativeCheckOrchestrator}.ts src/__tests__/nativeConfiguration.test.ts src/__tests__/nativeHostApi.test.ts
40+
git commit -m 'feat: preserve native-first identity and invalidate superseded configuration rounds'
41+
git push origin HEAD:refs/heads/feat/native-host-update-api

0 commit comments

Comments
 (0)