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-nightly/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Setup deps (nightly)
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 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
68 changes: 68 additions & 0 deletions .github/workflows/react-native-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: React Native Nightly
on:
# Runs every night at 5 AM
schedule:
- cron: '0 5 * * *'
# Manaual 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

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-nightly

- 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-nightly

- name: Typecheck
run: yarn typecheck

test:
needs: [install-cache-deps]
runs-on: ubuntu-latest
name: Test React 18
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

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

- name: Test
run: yarn test:ci