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
10 changes: 10 additions & 0 deletions .github/actions/setup-deps-rn-latest/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Setup deps (RN @latest)
description: Setup Node.js and install dependencies

inputs:
test-renderer-version:
description: Test renderer version to install (e.g., 1.1.0)
required: false

runs:
using: composite
steps:
Expand Down Expand Up @@ -32,3 +37,8 @@ runs:
@react-native/babel-preset@latest \
@react-native/jest-preset@latest
shell: bash

- name: Switch to test-renderer version
if: inputs.test-renderer-version != ''
run: yarn add -D test-renderer@${{ inputs.test-renderer-version }}
shell: bash
10 changes: 10 additions & 0 deletions .github/actions/setup-deps-rn-next/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Setup deps (RN @next)
description: Setup Node.js and install dependencies

inputs:
test-renderer-version:
description: Test renderer version to install (e.g., 1.1.0)
required: false

runs:
using: composite
steps:
Expand Down Expand Up @@ -32,3 +37,8 @@ runs:
@react-native/babel-preset@next \
@react-native/jest-preset@next
shell: bash

- name: Switch to test-renderer version
if: inputs.test-renderer-version != ''
run: yarn add -D test-renderer@${{ inputs.test-renderer-version }}
shell: bash
10 changes: 10 additions & 0 deletions .github/actions/setup-deps-rn-nightly/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Setup deps (RN nightly)
description: Setup Node.js and install dependencies

inputs:
test-renderer-version:
description: Test renderer version to install (e.g., 1.1.0)
required: false

runs:
using: composite
steps:
Expand Down Expand Up @@ -33,3 +38,8 @@ runs:
@react-native/babel-preset@nightly \
@react-native/jest-preset@nightly
shell: bash

- name: Switch to test-renderer version
if: inputs.test-renderer-version != ''
run: yarn add -D test-renderer@${{ inputs.test-renderer-version }}
shell: bash
17 changes: 16 additions & 1 deletion .github/actions/setup-deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ inputs:
react-native-version:
description: React Native version to install (e.g., 0.83.1)
required: false
test-renderer-version:
description: Test renderer version to install (e.g., 1.1.0)
required: false

runs:
using: composite
Expand Down Expand Up @@ -38,7 +41,14 @@ runs:
if: inputs.react-version != '' && inputs.react-native-version != ''
run: |
RN_VERSION='${{ inputs.react-native-version }}'
RN_MINOR="${RN_VERSION#0.}"
RN_VERSION_CLEAN="$RN_VERSION"

case "$RN_VERSION_CLEAN" in
'~'*) RN_VERSION_CLEAN="${RN_VERSION_CLEAN#\~}" ;;
'^'*) RN_VERSION_CLEAN="${RN_VERSION_CLEAN#^}" ;;
esac

RN_MINOR="${RN_VERSION_CLEAN#0.}"
RN_MINOR="${RN_MINOR%%.*}"

deps=(
Expand All @@ -56,3 +66,8 @@ runs:

yarn add -D "${deps[@]}"
shell: bash

- name: Switch to test-renderer version
if: inputs.test-renderer-version != ''
run: yarn add -D test-renderer@${{ inputs.test-renderer-version }}
shell: bash
20 changes: 20 additions & 0 deletions .github/actions/typecheck-react-19_2-if-supported/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Typecheck React 19.2 tests if supported
description: Run React 19.2-only test typecheck when the installed React version is 19.2 or newer

runs:
using: composite
steps:
- name: Typecheck React 19.2-only tests
run: |
REACT_VERSION="$(node -p "require('react/package.json').version")"
REACT_MAJOR="${REACT_VERSION%%.*}"
REACT_MINOR_PATCH="${REACT_VERSION#*.}"
REACT_MINOR="${REACT_MINOR_PATCH%%.*}"

if [ "$REACT_MAJOR" -gt 19 ] || { [ "$REACT_MAJOR" -eq 19 ] && [ "$REACT_MINOR" -ge 2 ]; }; then
echo "Running React 19.2-only typecheck for React $REACT_VERSION"
yarn typecheck:react-19_2
else
echo "Skipping React 19.2-only typecheck for React $REACT_VERSION"
fi
shell: bash
Loading
Loading