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: 4 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@

## Test Plan

<!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. -->
<!-- Demonstrate the code is solid. Include the exact commands you ran and their output. -->

- [ ] Ran local JS PR gate: `yarn test:pr`
- [ ] If this changes compression/upload/download native behavior, ran the Harness tests on a simulator/device: `yarn test:harness:android` or `yarn test:harness:ios`.
37 changes: 29 additions & 8 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Android App
name: Build Android

on:
push:
Expand All @@ -8,31 +8,45 @@ on:
- '.github/workflows/build-android.yml'
- 'android/**'
- 'examples/bare/android/**'
- 'yarn.lock'
- 'src/Spec/**'
- '**/react-native.config.js'
- 'package.json'
- 'yarn.lock'
pull_request:
paths:
- '.github/workflows/build-android.yml'
- 'android/**'
- 'examples/bare/android/**'
- 'yarn.lock'
- 'src/Spec/**'
- '**/react-native.config.js'
- 'package.json'
- 'yarn.lock'

jobs:
build_example:
build:
name: Build Android Example App
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: yarn

- name: Enable Corepack
run: corepack enable

- name: Install npm dependencies (yarn)
run: yarn install --immutable

- name: Setup JDK 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17

- name: Install node_modules
run: yarn install --immutable
java-package: jdk

- name: Restore Gradle cache
uses: actions/cache@v4
Expand All @@ -43,5 +57,12 @@ jobs:
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Run Gradle Build for examples/bare/android/
run: cd examples/bare/android && ./gradlew assembleDebug --build-cache && cd ../../..
working-directory: examples/bare/android
run: ./gradlew assembleDebug --no-daemon --build-cache

- name: Stop Gradle Daemon
if: always()
working-directory: examples/bare/android
run: ./gradlew --stop
62 changes: 42 additions & 20 deletions .github/workflows/build-ios.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build iOS App
name: Build iOS

on:
push:
Expand All @@ -7,34 +7,57 @@ on:
paths:
- '.github/workflows/build-ios.yml'
- 'ios/**'
- '*.podspec'
- 'examples/bare/ios/**'
- 'examples/bare/Gemfile'
- 'examples/bare/Gemfile.lock'
- 'src/Spec/**'
- '**/Podfile.lock'
- '**/*.podspec'
- '**/react-native.config.js'
- 'package.json'
- 'yarn.lock'
pull_request:
paths:
- '.github/workflows/build-ios.yml'
- 'ios/**'
- '*.podspec'
- 'examples/bare/ios/**'
- 'examples/bare/Gemfile'
- 'examples/bare/Gemfile.lock'
- 'src/Spec/**'
- '**/Podfile.lock'
- '**/*.podspec'
- '**/react-native.config.js'
- 'package.json'
- 'yarn.lock'

env:
USE_CCACHE: 1
RCT_NEW_ARCH_ENABLED: 1

jobs:
build:
name: Build iOS Example App
runs-on: macOS-latest
defaults:
run:
working-directory: examples/bare/ios
runs-on: macos-15
steps:
- uses: actions/checkout@v4

- name: Install node_modules
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: yarn

- name: Enable Corepack
run: corepack enable

- name: Install npm dependencies (yarn)
run: yarn install --immutable
working-directory: .

- name: Restore buildcache
uses: mikehardy/buildcache-action@v1
continue-on-error: true
- name: Restore ccache
uses: hendrikmuhs/ccache-action@v1.2

- name: Select Xcode 16.4
run: sudo xcode-select -s "/Applications/Xcode_16.4.app/Contents/Developer"

- name: Setup Ruby (bundle)
uses: ruby/setup-ruby@v1
Expand All @@ -46,25 +69,24 @@ jobs:
- name: Restore Pods cache
uses: actions/cache@v4
with:
path: |
examples/bare/ios/Pods
~/Library/Caches/CocoaPods
~/.cocoapods
path: examples/bare/ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-

- name: Install Pods
working-directory: examples/bare/ios
run: bundle exec pod check || bundle exec pod install
- name: Install xcpretty
run: gem install xcpretty

- name: Build App
working-directory: examples/bare/ios
run: "set -o pipefail && xcodebuild \
CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ \
-derivedDataPath build -UseModernBuildSystem=YES \
-workspace BareExample.xcworkspace \
-scheme BareExample \
-sdk iphonesimulator \
-configuration Debug \
-destination 'platform=iOS Simulator,name=iPhone 15 Pro' \
-destination 'generic/platform=iOS Simulator' \
build \
CODE_SIGNING_ALLOWED=NO | xcpretty"
CODE_SIGNING_ALLOWED=NO"
45 changes: 16 additions & 29 deletions .github/workflows/validate-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
paths:
- '.github/workflows/validate-js.yml'
- 'src/**'
- '__tests__/**'
- '*.json'
- '*.js'
- '*.lock'
Expand All @@ -22,6 +23,7 @@ on:
paths:
- '.github/workflows/validate-js.yml'
- 'src/**'
- '__tests__/**'
- '*.json'
- '*.js'
- '*.lock'
Expand All @@ -35,38 +37,23 @@ on:
- 'examples/expo/*.tsx'

jobs:
compile:
name: Compile JS (tsc)
validate:
name: Validate JS
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Install reviewdog
uses: reviewdog/action-setup@v1
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: yarn

- name: Install node_modules
run: yarn install --immutable
- name: Enable Corepack
run: corepack enable

- name: Run TypeScript # Reviewdog tsc errorformat: %f:%l:%c - error TS%n: %m
run: |
yarn typecheck | reviewdog -name="tsc" -efm="%f(%l,%c): error TS%n: %m" -reporter="github-pr-review" -filter-mode="nofilter" -fail-on-error -tee
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install node_modules
run: yarn install --immutable

lint:
name: Lint JS (eslint, prettier)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install node_modules
run: yarn install --immutable

- name: Run ESLint
run: yarn lint

- name: Run ESLint with auto-fix
run: yarn lint --fix

- name: Verify no files have changed after auto-fix
run: git diff --exit-code HEAD
- name: Run PR test gate
run: yarn test:pr
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ android/keystores/debug.keystore
# Turborepo
.turbo/

# React Native Harness generated files
.harness/
examples/bare/.harness/

# generated by bob
lib/
.mtslconfig.json
Expand Down
Loading
Loading