-
-
Notifications
You must be signed in to change notification settings - Fork 14
111 lines (89 loc) 路 2.53 KB
/
Copy pathtest.yml
File metadata and controls
111 lines (89 loc) 路 2.53 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: Test & build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup
uses: ./.github/actions/setup
- name: Lint files
run: pnpm lint
- name: Test formatting
run: pnpm format --check
- name: Verify formatted code is unchanged
run: git diff --exit-code HEAD
- name: Typecheck files
run: pnpm typecheck
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup
uses: ./.github/actions/setup
- name: Run tests
run: pnpm test
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup
uses: ./.github/actions/setup
- name: Build plugin
run: pnpm package build
parity-matrix:
name: React Native ${{ matrix.react-native }} parity
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
react-native:
- '0.83'
- '0.84'
- '0.85'
- '0.86'
- '0.87'
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Select React Native version
env:
REACT_NATIVE_VERSION: ${{ matrix.react-native }}
run: |
node <<'NODE'
const fs = require('node:fs');
const path = 'packages/react-native-boost/package.json';
const packageJson = JSON.parse(fs.readFileSync(path, 'utf8'));
const version = process.env.REACT_NATIVE_VERSION;
packageJson.devDependencies['react-native'] = version;
packageJson.devDependencies['@react-native/babel-preset'] = version;
fs.writeFileSync(path, `${JSON.stringify(packageJson, null, 2)}\n`);
NODE
- uses: pnpm/action-setup@v6
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version-file: .nvmrc
cache: pnpm
cache-dependency-path: |
pnpm-lock.yaml
packages/react-native-boost/package.json
- name: Enable Corepack
run: corepack enable
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Typecheck package
run: pnpm package typecheck
- name: Build package
run: pnpm package build
- name: Test runtime parity
run: pnpm package test --run --project parity