Skip to content

Commit e5fa23c

Browse files
chore: react native nightly latest (#1815)
1 parent a38d932 commit e5fa23c

File tree

7 files changed

+89
-46
lines changed

7 files changed

+89
-46
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Setup deps (RN @latest)
2+
description: Setup Node.js and install dependencies
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Setup Node.js
8+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
9+
with:
10+
node-version-file: .nvmrc
11+
12+
- name: Cache deps
13+
id: yarn-cache
14+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
15+
with:
16+
path: |
17+
./node_modules
18+
.yarn/install-state.gz
19+
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
20+
restore-keys: |
21+
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
22+
${{ runner.os }}-yarn-
23+
24+
- name: Install deps
25+
if: steps.yarn-cache.outputs.cache-hit != 'true'
26+
run: yarn install --immutable
27+
shell: bash
28+
29+
- name: Switch to React Native Latest
30+
run: |
31+
yarn add -D react-native@latest @react-native/babel-preset@latest
32+
shell: bash

.github/actions/setup-deps-rn-next/action.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,5 @@ runs:
2828

2929
- name: Switch to React Native Next
3030
run: |
31-
yarn remove react react-test-renderer react-native @react-native/babel-preset
32-
yarn add -D [email protected] [email protected] react-native@next @react-native/babel-preset@next
33-
yarn add -P [email protected] [email protected] react-native@next
31+
yarn add -D react-native@next @react-native/babel-preset@next
3432
shell: bash

.github/actions/setup-deps-rn-nightly/action.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,5 @@ runs:
2828

2929
- name: Switch to React Native Nightly
3030
run: |
31-
yarn remove react react-test-renderer react-native @react-native/babel-preset
32-
yarn add -D [email protected] [email protected] react-native@nightly @react-native/babel-preset@nightly
33-
yarn add -P [email protected] [email protected] react-native@nightly
31+
yarn add -D react-native@nightly @react-native/babel-preset@nightly [email protected] [email protected]
3432
shell: bash

.github/workflows/ci.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,7 @@ concurrency:
1414
cancel-in-progress: ${{ !contains(github.ref, 'main')}}
1515

1616
jobs:
17-
install-cache-deps:
18-
runs-on: ubuntu-latest
19-
name: Install and Cache deps
20-
steps:
21-
- name: Checkout
22-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
23-
24-
- name: Setup
25-
uses: ./.github/actions/setup-deps
26-
2717
lint:
28-
needs: [install-cache-deps]
2918
runs-on: ubuntu-latest
3019
name: Lint
3120
steps:
@@ -39,7 +28,6 @@ jobs:
3928
run: yarn lint
4029

4130
typecheck:
42-
needs: [install-cache-deps]
4331
runs-on: ubuntu-latest
4432
name: Typecheck
4533
steps:
@@ -53,7 +41,6 @@ jobs:
5341
run: yarn typecheck
5442

5543
test:
56-
needs: [install-cache-deps]
5744
runs-on: ubuntu-latest
5845
name: Test
5946
steps:
@@ -72,7 +59,6 @@ jobs:
7259
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
7360

7461
test-react-18:
75-
needs: [install-cache-deps]
7662
runs-on: ubuntu-latest
7763
name: Test React 18
7864
steps:
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: React Native Latest
2+
on:
3+
# Runs every night at 2 AM
4+
schedule:
5+
- cron: '0 2 * * *'
6+
# Manual trigger
7+
workflow_dispatch:
8+
9+
# Set minimal permissions by default
10+
permissions:
11+
contents: read
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: ${{ !contains(github.ref, 'main')}}
16+
17+
jobs:
18+
lint:
19+
runs-on: ubuntu-latest
20+
name: Lint
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
24+
25+
- name: Setup Node.js and deps
26+
uses: ./.github/actions/setup-deps-rn-latest
27+
28+
- name: Lint
29+
run: yarn lint
30+
31+
typecheck:
32+
runs-on: ubuntu-latest
33+
name: Typecheck
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
37+
38+
- name: Setup Node.js and deps
39+
uses: ./.github/actions/setup-deps-rn-latest
40+
41+
- name: Typecheck
42+
run: yarn typecheck
43+
44+
test:
45+
runs-on: ubuntu-latest
46+
name: Test
47+
steps:
48+
- name: Checkout
49+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
50+
51+
- name: Setup Node.js and deps
52+
uses: ./.github/actions/setup-deps-rn-latest
53+
54+
- name: Test
55+
run: yarn test:ci

.github/workflows/react-native-next.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,7 @@ concurrency:
1515
cancel-in-progress: ${{ !contains(github.ref, 'main')}}
1616

1717
jobs:
18-
install-cache-deps:
19-
runs-on: ubuntu-latest
20-
name: Install and Cache deps
21-
steps:
22-
- name: Checkout
23-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
24-
25-
- name: Setup
26-
uses: ./.github/actions/setup-deps-rn-next
27-
2818
lint:
29-
needs: [install-cache-deps]
3019
runs-on: ubuntu-latest
3120
name: Lint
3221
steps:
@@ -40,7 +29,6 @@ jobs:
4029
run: yarn lint
4130

4231
typecheck:
43-
needs: [install-cache-deps]
4432
runs-on: ubuntu-latest
4533
name: Typecheck
4634
steps:
@@ -54,7 +42,6 @@ jobs:
5442
run: yarn typecheck
5543

5644
test:
57-
needs: [install-cache-deps]
5845
runs-on: ubuntu-latest
5946
name: Test
6047
steps:

.github/workflows/react-native-nightly.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,7 @@ concurrency:
1515
cancel-in-progress: ${{ !contains(github.ref, 'main')}}
1616

1717
jobs:
18-
install-cache-deps:
19-
runs-on: ubuntu-latest
20-
name: Install and Cache deps
21-
steps:
22-
- name: Checkout
23-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
24-
25-
- name: Setup
26-
uses: ./.github/actions/setup-deps-rn-nightly
27-
2818
lint:
29-
needs: [install-cache-deps]
3019
runs-on: ubuntu-latest
3120
name: Lint
3221
steps:
@@ -40,7 +29,6 @@ jobs:
4029
run: yarn lint
4130

4231
typecheck:
43-
needs: [install-cache-deps]
4432
runs-on: ubuntu-latest
4533
name: Typecheck
4634
steps:
@@ -54,7 +42,6 @@ jobs:
5442
run: yarn typecheck
5543

5644
test:
57-
needs: [install-cache-deps]
5845
runs-on: ubuntu-latest
5946
name: Test
6047
steps:

0 commit comments

Comments
 (0)