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

runs:
using: composite
steps:
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version-file: .nvmrc

- name: Cache deps
id: yarn-cache
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: |
./node_modules
.yarn/install-state.gz
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
${{ runner.os }}-yarn-

- name: Install deps
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable
shell: bash

- name: Switch to React Native Latest
run: |
yarn add -D react-native@latest @react-native/babel-preset@latest
shell: bash
4 changes: 1 addition & 3 deletions .github/actions/setup-deps-rn-next/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,5 @@ runs:

- name: Switch to React Native Next
run: |
yarn remove react react-test-renderer react-native @react-native/babel-preset
yarn add -D [email protected] [email protected] react-native@next @react-native/babel-preset@next
yarn add -P [email protected] [email protected] react-native@next
yarn add -D react-native@next @react-native/babel-preset@next
shell: bash
4 changes: 1 addition & 3 deletions .github/actions/setup-deps-rn-nightly/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,5 @@ runs:

- name: Switch to React Native Nightly
run: |
yarn remove react react-test-renderer react-native @react-native/babel-preset
yarn add -D [email protected] [email protected] react-native@nightly @react-native/babel-preset@nightly
yarn add -P [email protected] [email protected] react-native@nightly
yarn add -D react-native@nightly @react-native/babel-preset@nightly [email protected] [email protected]
shell: bash
14 changes: 0 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,7 @@ concurrency:
cancel-in-progress: ${{ !contains(github.ref, 'main')}}

jobs:
install-cache-deps:
runs-on: ubuntu-latest
name: Install and Cache deps
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup
uses: ./.github/actions/setup-deps

lint:
needs: [install-cache-deps]
runs-on: ubuntu-latest
name: Lint
steps:
Expand All @@ -39,7 +28,6 @@ jobs:
run: yarn lint

typecheck:
needs: [install-cache-deps]
runs-on: ubuntu-latest
name: Typecheck
steps:
Expand All @@ -53,7 +41,6 @@ jobs:
run: yarn typecheck

test:
needs: [install-cache-deps]
runs-on: ubuntu-latest
name: Test
steps:
Expand All @@ -72,7 +59,6 @@ jobs:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

test-react-18:
needs: [install-cache-deps]
runs-on: ubuntu-latest
name: Test React 18
steps:
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/react-native-latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: React Native Latest
on:
# Runs every night at 2 AM
schedule:
- cron: '0 2 * * *'
# Manual trigger
workflow_dispatch:

# Set minimal permissions by default
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ !contains(github.ref, 'main')}}

jobs:
lint:
runs-on: ubuntu-latest
name: Lint
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Node.js and deps
uses: ./.github/actions/setup-deps-rn-latest

- name: Lint
run: yarn lint

typecheck:
runs-on: ubuntu-latest
name: Typecheck
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Node.js and deps
uses: ./.github/actions/setup-deps-rn-latest

- name: Typecheck
run: yarn typecheck

test:
runs-on: ubuntu-latest
name: Test
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Node.js and deps
uses: ./.github/actions/setup-deps-rn-latest

- name: Test
run: yarn test:ci
13 changes: 0 additions & 13 deletions .github/workflows/react-native-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,7 @@ concurrency:
cancel-in-progress: ${{ !contains(github.ref, 'main')}}

jobs:
install-cache-deps:
runs-on: ubuntu-latest
name: Install and Cache deps
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup
uses: ./.github/actions/setup-deps-rn-next

lint:
needs: [install-cache-deps]
runs-on: ubuntu-latest
name: Lint
steps:
Expand All @@ -40,7 +29,6 @@ jobs:
run: yarn lint

typecheck:
needs: [install-cache-deps]
runs-on: ubuntu-latest
name: Typecheck
steps:
Expand All @@ -54,7 +42,6 @@ jobs:
run: yarn typecheck

test:
needs: [install-cache-deps]
runs-on: ubuntu-latest
name: Test
steps:
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/react-native-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,7 @@ concurrency:
cancel-in-progress: ${{ !contains(github.ref, 'main')}}

jobs:
install-cache-deps:
runs-on: ubuntu-latest
name: Install and Cache deps
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup
uses: ./.github/actions/setup-deps-rn-nightly

lint:
needs: [install-cache-deps]
runs-on: ubuntu-latest
name: Lint
steps:
Expand All @@ -40,7 +29,6 @@ jobs:
run: yarn lint

typecheck:
needs: [install-cache-deps]
runs-on: ubuntu-latest
name: Typecheck
steps:
Expand All @@ -54,7 +42,6 @@ jobs:
run: yarn typecheck

test:
needs: [install-cache-deps]
runs-on: ubuntu-latest
name: Test
steps:
Expand Down