Skip to content

Commit 92606b9

Browse files
abueideclaude
andcommitted
chore(ci): remove E2E devbox infra, fix broken test, add tests to CI
- Remove devbox E2E scripts, nix flake, shells/, and GitHub workflows (E2E infra migrated to hosted devbox plugin in PR #1125) - Merge shells/devbox-fast.json into root devbox.json - Fix api.test.ts missing keepalive expectation (broken since #1120) - Add yarn test to CI build script and reorder: lint → test → build - Remove E2E references from package.json bootstrap/scripts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d30a158 commit 92606b9

25 files changed

Lines changed: 21 additions & 1391 deletions

.github/workflows/ci-fast.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 0 additions & 81 deletions
This file was deleted.

devbox.json

Lines changed: 17 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -6,102 +6,34 @@
66
"platforms": ["x86_64-darwin", "aarch64-darwin"]
77
},
88
"yarn-berry": "latest",
9+
"jq": "latest",
910
"treefmt": "latest",
1011
"nixfmt": "latest",
11-
"shfmt": "latest",
12-
"jdk17": "latest",
13-
"gradle": "latest",
14-
"jq": "latest",
15-
"netcat": "latest",
16-
"path:./nix#android-sdk": ""
12+
"shfmt": "latest"
1713
},
1814
"shell": {
19-
"init_hook": [
20-
"echo 'Welcome to analytics-react-native devbox!' > /dev/null",
21-
". $DEVBOX_PROJECT_ROOT/scripts/shared/common.sh",
22-
"if [ \"$(uname -s)\" = \"Darwin\" ]; then . $DEVBOX_PROJECT_ROOT/scripts/ios/env.sh; fi",
23-
". $DEVBOX_PROJECT_ROOT/scripts/android/env.sh",
24-
"echo 'Android SDK env configured (details: wiki/devbox.md#devbox-android).'"
25-
],
15+
"init_hook": [". $DEVBOX_PROJECT_ROOT/scripts/shared/common.sh"],
2616
"scripts": {
27-
"clean": [
28-
"rm -rf $DEVBOX_PROJECT_ROOT/examples/E2E/ios/Podfile.lock",
29-
"rm -rf $DEVBOX_PROJECT_ROOT/examples/E2E/ios/Pods",
30-
"cd $DEVBOX_PROJECT_DIR/examples/E2E/android && gradle clean",
31-
"yarn cache clean",
32-
"find $DEVBOX_PROJECT_DIR -type d -name node_modules -exec rmdir {} \\;"
33-
],
3417
"build": ["bash $SCRIPTS_DIR/build.sh"],
18+
"release": [
19+
"cd \"$PROJECT_ROOT\"",
20+
"yarn install --immutable",
21+
"yarn build",
22+
"yarn multi-semantic-release"
23+
],
24+
"release-dry-run": [
25+
"cd \"$PROJECT_ROOT\"",
26+
"yarn install --immutable",
27+
"yarn build",
28+
"yarn multi-semantic-release --dry-run"
29+
],
3530
"format": ["treefmt"],
3631
"lint": ["treefmt --fail-on-change"],
37-
"test-android": ["bash $SCRIPTS_DIR/android/test.sh"],
38-
"test-ios": ["bash $SCRIPTS_DIR/ios/test.sh"],
39-
"act-ci": [
40-
"bash $SCRIPTS_DIR/act-ci.sh --platform ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-24.04"
41-
],
42-
"setup-android": ["bash $SCRIPTS_DIR/android/setup.sh"],
43-
"setup-ios": ["bash $SCRIPTS_DIR/ios/setup.sh"],
44-
"start-emulator": ["bash $SCRIPTS_DIR/android/manager.sh start"],
45-
"start-ios": ["bash $SCRIPTS_DIR/ios/manager.sh start"],
46-
"start-android-minsdk": ["bash $SCRIPTS_DIR/android/manager.sh start"],
47-
"start-android-latest": [
48-
"AVD_FLAVOR=latest bash $SCRIPTS_DIR/android/manager.sh start"
49-
],
50-
"start-android": ["bash $SCRIPTS_DIR/android/manager.sh start"],
32+
"sync-versions": ["bash $SCRIPTS_DIR/sync-versions.sh"],
5133
"update-apps": [
5234
"yarn install --no-immutable",
53-
"yarn e2e install --no-immutable",
5435
"yarn example install --no-immutable"
55-
],
56-
"update-shells": [
57-
"devbox update",
58-
"devbox update --config=shells/devbox-fast.json",
59-
"devbox update --config=shells/devbox-android.json",
60-
"devbox update --config=shells/devbox-ios.json"
61-
],
62-
"reset-android": [
63-
"rm -rf ~/.android/avd",
64-
"rm -f ~/.android/adbkey*",
65-
"echo \"AVDs and adb keys removed. Recreate via devbox run start-android* as needed.\""
66-
],
67-
"reset-ios": [
68-
"xcrun simctl shutdown all || true",
69-
"xcrun simctl erase all || true",
70-
"xcrun simctl delete all || true",
71-
"xcrun simctl delete unavailable || true",
72-
"killall -9 com.apple.CoreSimulatorService 2>/dev/null || true",
73-
"echo \"Simulators reset via simctl. Recreate via devbox run start-ios.\""
74-
],
75-
"stop-android": [
76-
"if command -v adb >/dev/null 2>&1; then",
77-
" devices=$(adb devices -l 2>/dev/null | tail -n +2 | awk '{print $1}' | tr '\\n' ' ');",
78-
" if [[ -n \"$devices\" ]]; then",
79-
" echo \"Stopping Android emulators: $devices\";",
80-
" for d in $devices; do adb -s \"$d\" emu kill >/dev/null 2>&1 || true; done;",
81-
" else",
82-
" echo \"No Android emulators detected via adb.\";",
83-
" fi;",
84-
"else",
85-
" echo \"adb not found; skipping Android emulator shutdown.\";",
86-
"fi",
87-
"pkill -f \"emulator@\" >/dev/null 2>&1 || true",
88-
"echo \"Android emulators stopped (if any were running).\""
89-
],
90-
"stop-ios": [
91-
"if command -v xcrun >/dev/null 2>&1 && xcrun -f simctl >/dev/null 2>&1; then",
92-
" if xcrun simctl list devices booted | grep -q \"Booted\"; then",
93-
" echo \"Shutting down booted iOS simulators...\";",
94-
" xcrun simctl shutdown all >/dev/null 2>&1 || true;",
95-
" else",
96-
" echo \"No booted iOS simulators detected.\";",
97-
" fi;",
98-
"else",
99-
" echo \"simctl not available; skipping iOS shutdown.\";",
100-
"fi",
101-
"echo \"iOS simulators shutdown (if any were running).\""
102-
],
103-
"stop": ["devbox run stop-android", "devbox run stop-ios"],
104-
"test": ["devbox run test-android", "devbox run test-ios"]
36+
]
10537
}
10638
}
10739
}

nix/flake.lock

Lines changed: 0 additions & 27 deletions
This file was deleted.

nix/flake.nix

Lines changed: 0 additions & 74 deletions
This file was deleted.

nix/platform-versions.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@
88
"packages/plugins/*"
99
],
1010
"scripts": {
11-
"bootstrap": "yarn install && yarn example install && yarn example pods && yarn e2e install && yarn e2e pods && husky install",
12-
"bootstrap:ci": "yarn install && yarn e2e install && yarn e2e pods && husky install",
11+
"bootstrap": "yarn install && yarn example install && yarn example pods && husky install",
1312
"core": "yarn workspace @segment/analytics-react-native",
1413
"sovran": "yarn workspace @segment/sovran-react-native",
1514
"example": "yarn --cwd examples/AnalyticsReactNativeExample",
16-
"e2e": "yarn --cwd examples/E2E",
1715
"build": "yarn workspaces foreach -A -p --topological-dev run build",
1816
"testAll": "yarn workspaces foreach -A -p run test --passWithNoTests",
1917
"clean": "yarn workspaces foreach -A -p run clean",

packages/core/src/__tests__/api.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ describe('#sendEvents', () => {
6464

6565
expect(fetch).toHaveBeenCalledWith(toUrl, {
6666
method: 'POST',
67+
keepalive: true,
6768
body: JSON.stringify({
6869
batch: [event],
6970
sentAt: '2001-01-01T00:00:00.000Z',

0 commit comments

Comments
 (0)