-
-
Notifications
You must be signed in to change notification settings - Fork 50
74 lines (64 loc) · 2.37 KB
/
test.yml
File metadata and controls
74 lines (64 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Test
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
APP_NAME: MyApp
NODEJS_VERSION: 24
jobs:
pure_rn:
name: Analyze bundle with React Native ${{ matrix.rn-version }}
runs-on: ubuntu-latest
strategy:
matrix:
rn-version: [latest, 0.83.4, 0.82.1] # Three latest major versions of React Native
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Use Node.js ${{ env.NODEJS_VERSION }}
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODEJS_VERSION }}
cache: 'yarn'
- name: Install node_modules in ${{ github.workspace }}
run: yarn install --frozen-lockfile
- name: Install React Native ${{ matrix.rn-version }} and run the visualizer
working-directory: /tmp
shell: bash
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
run: |
set -x # print all executed commands
npx @react-native-community/cli@latest init ${{ env.APP_NAME }} --version ${{ matrix.rn-version }} --skip-git-init --install-pods false --pm yarn
cd ${{ env.APP_NAME }}
yarn add react-native-bundle-visualizer@portal:${{ github.workspace }} # yarn v2+ syntax
yarn run react-native-bundle-visualizer --verbose --error-on-fail
expo:
name: Analyze bundle with Expo default@sdk-${{ matrix.expo-sdk }}
runs-on: ubuntu-latest
strategy:
matrix:
expo-sdk: [ 55, 54, 53 ] # Three latest major Expo SDK versions
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Use Node.js ${{ env.NODEJS_VERSION }}
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODEJS_VERSION }}
cache: 'yarn'
- name: Install node_modules in ${{ github.workspace }}
run: yarn install --frozen-lockfile
- name: Install Expo and run the visualizer
working-directory: /tmp
shell: bash
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
run: |
set -x # print all executed commands
yarn create expo-app ${{ env.APP_NAME }} --template default@sdk-${{ matrix.expo-sdk }}
cd ${{ env.APP_NAME }}
yarn add ${{ github.workspace }} # yarn v1 syntax
yarn run react-native-bundle-visualizer --verbose --expo --error-on-fail --bundle-output=./dist/ios.bundle