Skip to content

Commit b90668c

Browse files
committed
Move libraries to a top level .json file
1 parent 4c67be2 commit b90668c

File tree

2 files changed

+223
-32
lines changed

2 files changed

+223
-32
lines changed

.github/workflows/test-libraries-on-nightlies.yml

Lines changed: 13 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,18 @@ jobs:
2222
runs-on: ubuntu-latest
2323
outputs:
2424
runners: '{"ios":"macos-latest", "android": "ubuntu-latest"}'
25+
libraries: ${{ steps.read-libraries.outputs.libraries }}
26+
library-data: ${{ steps.read-libraries.outputs.library-data }}
2527
steps:
26-
- run: echo no-op
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
- name: Read libraries from JSON
31+
id: read-libraries
32+
run: |
33+
# Extract just the library names (keys) for the matrix
34+
echo "libraries=$(cat libraries.json | jq -c 'keys')" >> $GITHUB_OUTPUT
35+
# Keep the full library data for accessing commands and other metadata
36+
echo "library-data=$(cat libraries.json | tr -d '\n')" >> $GITHUB_OUTPUT
2737
2838
test-library-on-nightly:
2939
name: "[${{ matrix.platform }}] ${{ matrix.library }}"
@@ -32,36 +42,7 @@ jobs:
3242
continue-on-error: true
3343
strategy:
3444
matrix:
35-
library: [
36-
"react-native-async-storage",
37-
"react-native-blob-util",
38-
"@react-native-clipboard/clipboard",
39-
"@react-native-community/datetimepicker",
40-
"react-native-gesture-handler",
41-
"react-native-image-picker",
42-
"react-native-linear-gradient",
43-
"@react-native-masked-view/masked-view",
44-
# "react-native-maps", React Native Maps with the New Arch support has a complex cocoapods setup for iOS. It needs a dedicated workflow.
45-
"@react-native-community/netinfo",
46-
"react-native-reanimated@nightly react-native-worklets@nightly", #reanimated requires worklet to be explicitly installed as a separate package
47-
"react-native-svg",
48-
"react-native-video",
49-
"react-native-webview",
50-
"react-native-mmkv",
51-
"react-native-screens",
52-
"react-native-pager-view",
53-
"@react-native-community/slider",
54-
# additional OSS libs used internally
55-
"scandit-react-native-datacapture-barcode scandit-react-native-datacapture-core",
56-
"react-native-contacts",
57-
"react-native-device-info",
58-
"react-native-email-link",
59-
"@dr.pogodin/react-native-fs",
60-
"react-native-permissions",
61-
"react-native-vector-icons",
62-
"react-native-masked-view",
63-
"@react-native-community/image-editor",
64-
]
45+
library: ${{ fromJSON(needs.runner-setup.outputs.libraries) }}
6546
platform: [ios, android]
6647
steps:
6748
- name: Checkout
@@ -75,7 +56,7 @@ jobs:
7556
id: run-test
7657
uses: ./.github/actions/test-library-on-nightly
7758
with:
78-
library-npm-package: ${{ matrix.library }}
59+
library-npm-package: ${{ fromJSON(needs.runner-setup.outputs.library-data)[matrix.library].installCommand }}
7960
platform: ${{ matrix.platform }}
8061
- name: Save outcome
8162
id: save-outcome

libraries.json

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
{
2+
"react-native-async-storage": {
3+
"description": "Asynchronous, persistent key-value storage system for React Native",
4+
"installCommand": "react-native-async-storage",
5+
"android": true,
6+
"ios": true,
7+
"maintainersUsernames": [],
8+
"notes": ""
9+
},
10+
"react-native-blob-util": {
11+
"description": "A module provides upload, download, and files access API",
12+
"installCommand": "react-native-blob-util",
13+
"android": true,
14+
"ios": true,
15+
"maintainersUsernames": [],
16+
"notes": ""
17+
},
18+
"@react-native-clipboard/clipboard": {
19+
"description": "React Native Clipboard API for iOS and Android",
20+
"installCommand": "@react-native-clipboard/clipboard",
21+
"android": true,
22+
"ios": true,
23+
"maintainersUsernames": [],
24+
"notes": ""
25+
},
26+
"@react-native-community/datetimepicker": {
27+
"description": "React Native date & time picker component for iOS, Android and Windows",
28+
"installCommand": "@react-native-community/datetimepicker",
29+
"android": true,
30+
"ios": true,
31+
"maintainersUsernames": [],
32+
"notes": ""
33+
},
34+
"react-native-gesture-handler": {
35+
"description": "Declarative API exposing platform native touch and gesture system to React Native",
36+
"installCommand": "react-native-gesture-handler",
37+
"android": true,
38+
"ios": true,
39+
"maintainersUsernames": [],
40+
"notes": ""
41+
},
42+
"react-native-image-picker": {
43+
"description": "A React Native module that allows you to use native UI to select media from the device library or directly from the camera",
44+
"installCommand": "react-native-image-picker",
45+
"android": true,
46+
"ios": true,
47+
"maintainersUsernames": [],
48+
"notes": ""
49+
},
50+
"react-native-linear-gradient": {
51+
"description": "A <LinearGradient /> component for react-native",
52+
"installCommand": "react-native-linear-gradient",
53+
"android": true,
54+
"ios": true,
55+
"maintainersUsernames": [],
56+
"notes": ""
57+
},
58+
"@react-native-masked-view/masked-view": {
59+
"description": "React Native MaskedView component",
60+
"installCommand": "@react-native-masked-view/masked-view",
61+
"android": true,
62+
"ios": true,
63+
"maintainersUsernames": [],
64+
"notes": ""
65+
},
66+
"@react-native-community/netinfo": {
67+
"description": "React Native Network Info API for iOS & Android",
68+
"installCommand": "@react-native-community/netinfo",
69+
"android": true,
70+
"ios": true,
71+
"maintainersUsernames": [],
72+
"notes": ""
73+
},
74+
"react-native-reanimated": {
75+
"description": "React Native's Animated library reimplemented",
76+
"installCommand": "react-native-reanimated@nightly react-native-worklets@nightly",
77+
"android": true,
78+
"ios": true,
79+
"maintainersUsernames": [],
80+
"notes": ""
81+
},
82+
"react-native-svg": {
83+
"description": "SVG library for React Native, React Native Web, and plain React web projects",
84+
"installCommand": "react-native-svg",
85+
"android": true,
86+
"ios": true,
87+
"maintainersUsernames": [],
88+
"notes": ""
89+
},
90+
"react-native-video": {
91+
"description": "A <Video /> component for react-native",
92+
"installCommand": "react-native-video",
93+
"android": true,
94+
"ios": true,
95+
"maintainersUsernames": [],
96+
"notes": ""
97+
},
98+
"react-native-webview": {
99+
"description": "React Native WebView component for iOS, Android, macOS, and Windows",
100+
"installCommand": "react-native-webview",
101+
"android": true,
102+
"ios": true,
103+
"maintainersUsernames": [],
104+
"notes": ""
105+
},
106+
"react-native-mmkv": {
107+
"description": "The fastest key/value storage for React Native",
108+
"installCommand": "react-native-mmkv",
109+
"android": true,
110+
"ios": true,
111+
"maintainersUsernames": [],
112+
"notes": ""
113+
},
114+
"react-native-screens": {
115+
"description": "Native navigation primitives for your React Native app",
116+
"installCommand": "react-native-screens",
117+
"android": true,
118+
"ios": true,
119+
"maintainersUsernames": [],
120+
"notes": ""
121+
},
122+
"react-native-pager-view": {
123+
"description": "React Native wrapper for the Android ViewPager and iOS UIPageViewController",
124+
"installCommand": "react-native-pager-view",
125+
"android": true,
126+
"ios": true,
127+
"maintainersUsernames": [],
128+
"notes": ""
129+
},
130+
"@react-native-community/slider": {
131+
"description": "React Native component used to select a single value from a range of values",
132+
"installCommand": "@react-native-community/slider",
133+
"android": true,
134+
"ios": true,
135+
"maintainersUsernames": [],
136+
"notes": ""
137+
},
138+
"scandit-react-native": {
139+
"description": "Scandit Data Capture SDK for React Native",
140+
"installCommand": "scandit-react-native-datacapture-barcode scandit-react-native-datacapture-core",
141+
"android": true,
142+
"ios": true,
143+
"maintainersUsernames": [],
144+
"notes": "Additional OSS libs used internally"
145+
},
146+
"react-native-contacts": {
147+
"description": "React Native Contacts for iOS and Android",
148+
"installCommand": "react-native-contacts",
149+
"android": true,
150+
"ios": true,
151+
"maintainersUsernames": [],
152+
"notes": "Additional OSS libs used internally"
153+
},
154+
"react-native-device-info": {
155+
"description": "Device Information for React Native iOS and Android",
156+
"installCommand": "react-native-device-info",
157+
"android": true,
158+
"ios": true,
159+
"maintainersUsernames": [],
160+
"notes": "Additional OSS libs used internally"
161+
},
162+
"react-native-email-link": {
163+
"description": "An easy way to open an email app from a react native app",
164+
"installCommand": "react-native-email-link",
165+
"android": true,
166+
"ios": true,
167+
"maintainersUsernames": [],
168+
"notes": "Additional OSS libs used internally"
169+
},
170+
"@dr.pogodin/react-native-fs": {
171+
"description": "Native filesystem access for react-native",
172+
"installCommand": "@dr.pogodin/react-native-fs",
173+
"android": true,
174+
"ios": true,
175+
"maintainersUsernames": [],
176+
"notes": "Additional OSS libs used internally"
177+
},
178+
"react-native-permissions": {
179+
"description": "An unified permissions API for React Native on iOS, Android and Windows",
180+
"installCommand": "react-native-permissions",
181+
"android": true,
182+
"ios": true,
183+
"maintainersUsernames": [],
184+
"notes": "Additional OSS libs used internally"
185+
},
186+
"react-native-vector-icons": {
187+
"description": "Customizable Icons for React Native with support for NavBar/TabBar, image source and full styling",
188+
"installCommand": "react-native-vector-icons",
189+
"android": true,
190+
"ios": true,
191+
"maintainersUsernames": [],
192+
"notes": "Additional OSS libs used internally"
193+
},
194+
"react-native-masked-view": {
195+
"description": "React Native MaskedView component",
196+
"installCommand": "react-native-masked-view",
197+
"android": true,
198+
"ios": true,
199+
"maintainersUsernames": [],
200+
"notes": "Additional OSS libs used internally"
201+
},
202+
"@react-native-community/image-editor": {
203+
"description": "Image Editor Native Module for React Native",
204+
"installCommand": "@react-native-community/image-editor",
205+
"android": true,
206+
"ios": true,
207+
"maintainersUsernames": [],
208+
"notes": "Additional OSS libs used internally"
209+
}
210+
}

0 commit comments

Comments
 (0)