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

runs:
Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/react-native-next.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: React Native Next
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:
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:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

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

- name: Lint
run: yarn lint

typecheck:
needs: [install-cache-deps]
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-next

- name: Typecheck
run: yarn typecheck

test:
needs: [install-cache-deps]
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-next

- name: Test
run: yarn test:ci
10 changes: 5 additions & 5 deletions .github/workflows/react-native-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
# Runs every night at 5 AM
schedule:
- cron: '0 5 * * *'
# Manaual trigger
# Manual trigger
workflow_dispatch:

# Set minimal permissions by default
Expand All @@ -23,7 +23,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

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

lint:
needs: [install-cache-deps]
Expand All @@ -34,7 +34,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

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

- name: Lint
run: yarn lint
Expand All @@ -48,7 +48,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

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

- name: Typecheck
run: yarn typecheck
Expand All @@ -62,7 +62,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

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

- name: Test
run: yarn test:ci