Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/bash

# Automatically sets up your devbox environment whenever you cd into this
# directory via our direnv integration:
# directory via our direnv integration.
# Uses omit-nix-env as a temporary workaround: https://github.com/jetify-com/devbox/issues/1509

eval "$(devbox generate direnv --print-envrc)"
eval "$(devbox shellenv --init-hook --install --no-refresh-alias --omit-nix-env=true)"

# check out https://www.jetpack.io/devbox/docs/ide_configuration/direnv/
# for more details
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: E2E (Nightly)
name: E2E (Full)

on:
schedule:
- cron: '0 6 * * *'
workflow_dispatch:

concurrency:
group: e2e-nightly-${{ github.ref }}
group: e2e-full-${{ github.ref }}
cancel-in-progress: false

jobs:
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
echo "IOS_RUNTIME=${PLATFORM_IOS_MAX_RUNTIME}" >> "$GITHUB_ENV"
fi
- name: iOS E2E Tests
run: devbox shell --omit-nix-env -- devbox run test-ios
run: devbox run --config=shells/devbox-ios.json test-ios

run-e2e-android:
runs-on: ubuntu-24.04-arm
Expand Down Expand Up @@ -102,4 +102,4 @@ jobs:
avd_name="${device}_API${api}_arm64_v8a"
echo "DETOX_AVD=${avd_name}" >> "$GITHUB_ENV"
- name: Android E2E Tests
run: devbox run test-android
run: devbox run --config=shells/devbox-android.json test-android
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
name: E2E (On-Demand)
name: E2E (Latest)

on:
workflow_dispatch:
push:
branches: [ci2]

concurrency:
group: e2e-optional-${{ github.ref }}
group: e2e-latest-${{ github.ref }}
cancel-in-progress: false

jobs:
Expand Down Expand Up @@ -44,7 +42,7 @@ jobs:
echo "DETOX_IOS_DEVICE=${PLATFORM_IOS_MAX_DEVICE}" >> "$GITHUB_ENV"
echo "IOS_RUNTIME=${PLATFORM_IOS_MAX_RUNTIME}" >> "$GITHUB_ENV"
- name: iOS E2E Tests (latest)
run: devbox shell --omit-nix-env -- devbox run test-ios
run: devbox run --config=shells/devbox-ios.json test-ios

run-e2e-android:
runs-on: ubuntu-24.04-arm
Expand Down Expand Up @@ -80,4 +78,4 @@ jobs:
avd_name="${device}_API${api}_arm64_v8a"
echo "DETOX_AVD=${avd_name}" >> "$GITHUB_ENV"
- name: Android E2E Tests (latest)
run: devbox run test-android
run: devbox run --config=shells/devbox-android.json test-android
20 changes: 1 addition & 19 deletions .github/workflows/ci-fast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Aggressive disk cleanup (Ubuntu)
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/local/lib/node_modules
sudo rm -rf /usr/local/share/boost
sudo rm -rf /usr/local/share/chromium
sudo rm -rf /usr/local/share/powershell
sudo rm -rf /usr/local/share/edge_driver
sudo rm -rf /usr/local/share/gecko_driver
sudo rm -rf /usr/local/share/phantomjs
sudo rm -rf "$HOME/.cache"
df -H
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@v1.3.1
- name: devbox installer
uses: jetify-com/devbox-install-action@v0.14.0
with:
enable-cache: 'false'
- name: build
run: devbox run build
run: devbox run --config=shells/devbox-fast.json build
127 changes: 111 additions & 16 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,118 @@ on:
required: true

jobs:
fast-checks:
name: Build + Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: devbox installer
uses: jetify-com/devbox-install-action@v0.14.0
with:
enable-cache: 'false'
- name: build
run: devbox run --config=shells/devbox-fast.json build

e2e-ios:
name: E2E iOS (min/max)
runs-on: macos-26
env:
YARN_ENABLE_HARDENED_MODE: 0
XCODE_VERSION: '26.2'
strategy:
matrix:
include:
- name: ios-min
- name: ios-latest
steps:
- uses: actions/checkout@v4
- name: Aggressive disk cleanup (macOS)
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo rm -rf /Applications/Android\ Studio.app
sudo rm -rf /usr/local/share/miniconda
sudo rm -rf /opt/homebrew
sudo rm -rf "$HOME/Library/Android"
sudo rm -rf "$HOME/.gradle"
sudo rm -rf "$HOME/Library/Developer/CoreSimulator/Devices"
sudo rm -rf "$HOME/Library/Developer/Xcode/DerivedData"
df -H
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '26.2'
- name: devbox installer
uses: jetify-com/devbox-install-action@v0.14.0
with:
enable-cache: 'false'
- name: Resolve iOS targets
run: |
. scripts/platform-versions.sh
if [ "${{ matrix.name }}" = "ios-min" ]; then
echo "DETOX_IOS_DEVICE=${PLATFORM_IOS_MIN_DEVICE}" >> "$GITHUB_ENV"
echo "IOS_RUNTIME=${PLATFORM_IOS_MIN_RUNTIME}" >> "$GITHUB_ENV"
else
echo "DETOX_IOS_DEVICE=${PLATFORM_IOS_MAX_DEVICE}" >> "$GITHUB_ENV"
echo "IOS_RUNTIME=${PLATFORM_IOS_MAX_RUNTIME}" >> "$GITHUB_ENV"
fi
- name: iOS E2E Tests
run: devbox run --config=shells/devbox-ios.json test-ios

e2e-android:
name: E2E Android (min/max)
runs-on: ubuntu-24.04-arm
env:
EMU_HEADLESS: 1
strategy:
matrix:
include:
- name: android-min
target: min
- name: android-latest
target: max
steps:
- uses: actions/checkout@v4
- name: Aggressive disk cleanup (Ubuntu)
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/local/lib/node_modules
sudo rm -rf /usr/local/share/boost
sudo rm -rf /usr/local/share/chromium
sudo rm -rf /usr/local/share/powershell
sudo rm -rf /usr/local/share/edge_driver
sudo rm -rf /usr/local/share/gecko_driver
sudo rm -rf /usr/local/share/phantomjs
sudo rm -rf "$HOME/.cache"
df -H
- name: devbox installer
uses: jetify-com/devbox-install-action@v0.14.0
with:
enable-cache: 'false'
- name: Resolve Android targets
run: |
. scripts/platform-versions.sh
if [ "${{ matrix.target }}" = "min" ]; then
api="$PLATFORM_ANDROID_MIN_API"
device="$PLATFORM_ANDROID_MIN_DEVICE"
else
api="$PLATFORM_ANDROID_MAX_API"
device="$PLATFORM_ANDROID_MAX_DEVICE"
fi
avd_name="${device}_API${api}_arm64_v8a"
echo "DETOX_AVD=${avd_name}" >> "$GITHUB_ENV"
- name: Android E2E Tests
run: devbox run --config=shells/devbox-android.json test-android

publish:
name: Publish to npm
environment: Publish
needs: [fast-checks, e2e-ios, e2e-android]
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
Expand All @@ -23,22 +132,10 @@ jobs:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}

# Workaround for corepack enable in node
# Source: (https://github.com/actions/setup-node/issues/899#issuecomment-1828798029)
- uses: actions/setup-node@v4
with:
node-version: 20
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
# End workaround

- name: devbox installer
uses: jetify-com/devbox-install-action@v0.14.0
with:
enable-cache: 'true'
enable-cache: 'false'

- name: Config, Build, Release
run: devbox run release
Expand All @@ -49,6 +146,4 @@ jobs:

- name: Update Apps
run: |
yarn install --no-immutable
yarn e2e install --no-immutable
yarn example install --no-immutable
devbox run update-apps
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,6 @@ tsconfig.tsbuildinfo
packages/core/src/info.ts

.pnpm/

AGENTS.md

35 changes: 0 additions & 35 deletions AGENTS.md

This file was deleted.

66 changes: 28 additions & 38 deletions devbox.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@
"jdk17": "latest",
"gradle": "latest",
"jq": "latest",
"netcat": "latest",
"path:./nix#android-sdk": ""
},
"shell": {
"init_hook": [
"echo 'Welcome to analytics-react-native devbox!' > /dev/null",
". $DEVBOX_PROJECT_ROOT/scripts/android-env.sh",
". $DEVBOX_PROJECT_ROOT/scripts/shared/common.sh",
"if [ \"$(uname -s)\" = \"Darwin\" ]; then . $DEVBOX_PROJECT_ROOT/scripts/ios/env.sh; fi",
". $DEVBOX_PROJECT_ROOT/scripts/android/env.sh",
"echo 'Android SDK env configured (details: wiki/devbox.md#devbox-android).'"
],
"scripts": {
Expand All @@ -28,53 +31,40 @@
"yarn cache clean",
"find $DEVBOX_PROJECT_DIR -type d -name node_modules -exec rmdir {} \\;"
],
"build": [
"yarn install --immutable",
"yarn build",
"yarn lint",
"yarn test --coverage"
],
"test-android": [
"devbox run setup-android",
"yarn install",
"yarn e2e install",
"yarn build",
"yarn e2e build:android",
"yarn e2e test:android"
],
"test-ios": [
"devbox run setup-ios",
"yarn install",
"yarn e2e install",
"yarn e2e pods",
"yarn build",
"yarn e2e build:ios",
"yarn e2e test:ios"
],
"build": ["bash $SCRIPTS_DIR/build.sh"],
"format": ["treefmt"],
"lint": ["treefmt --fail-on-change"],
"test-android": ["bash $SCRIPTS_DIR/android/test.sh"],
"test-ios": ["bash $SCRIPTS_DIR/ios/test.sh"],
"act-ci": [
"bash $DEVBOX_PROJECT_ROOT/scripts/act-ci.sh --platform ubuntu-latest=node:20-bullseye"
],
"setup-android": ["bash $DEVBOX_PROJECT_ROOT/scripts/android-setup.sh"],
"setup-ios": ["bash $DEVBOX_PROJECT_ROOT/scripts/ios-setup.sh"],
"start-emulator": [
"bash $DEVBOX_PROJECT_ROOT/scripts/android-manager.sh start"
],
"start-ios": ["bash $DEVBOX_PROJECT_ROOT/scripts/ios-manager.sh start"],
"start-android-minsdk": [
"bash $DEVBOX_PROJECT_ROOT/scripts/android-manager.sh start"
"bash $SCRIPTS_DIR/act-ci.sh --platform ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-24.04"
],
"setup-android": ["bash $SCRIPTS_DIR/android/setup.sh"],
"setup-ios": ["bash $SCRIPTS_DIR/ios/setup.sh"],
"start-emulator": ["bash $SCRIPTS_DIR/android/manager.sh start"],
"start-ios": ["bash $SCRIPTS_DIR/ios/manager.sh start"],
"start-android-minsdk": ["bash $SCRIPTS_DIR/android/manager.sh start"],
"start-android-latest": [
"AVD_FLAVOR=latest bash $DEVBOX_PROJECT_ROOT/scripts/android-manager.sh start"
],
"start-android": [
"bash $DEVBOX_PROJECT_ROOT/scripts/android-manager.sh start"
"AVD_FLAVOR=latest bash $SCRIPTS_DIR/android/manager.sh start"
],
"start-android": ["bash $SCRIPTS_DIR/android/manager.sh start"],
"release": [
"npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}",
"yarn install --immutable",
"yarn build",
"yarn release"
],
"update-apps": [
"yarn install --no-immutable",
"yarn e2e install --no-immutable",
"yarn example install --no-immutable"
],
"update-shells": [
"devbox update",
"devbox update --config=shells/devbox-fast.json",
"devbox update --config=shells/devbox-android.json",
"devbox update --config=shells/devbox-ios.json"
],
"reset-android": [
"rm -rf ~/.android/avd",
"rm -f ~/.android/adbkey*",
Expand Down
Loading
Loading