Skip to content

Commit c4c0b80

Browse files
committed
fix(ci): updated to fix CI issues
1 parent 72d5853 commit c4c0b80

File tree

13 files changed

+7896
-13480
lines changed

13 files changed

+7896
-13480
lines changed

.github/actions/setup/action.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,17 @@ runs:
1010
node-version-file: .nvmrc
1111

1212
- name: Cache dependencies
13-
id: yarn-cache
13+
id: npm-cache
1414
uses: actions/cache@v3
1515
with:
1616
path: |
1717
**/node_modules
18-
.yarn/install-state.gz
19-
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
18+
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json', '!node_modules/**') }}
2019
restore-keys: |
21-
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
22-
${{ runner.os }}-yarn-
20+
${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
21+
${{ runner.os }}-npm-
2322
2423
- name: Install dependencies
25-
if: steps.yarn-cache.outputs.cache-hit != 'true'
26-
run: yarn install --immutable
24+
if: steps.npm-cache.outputs.cache-hit != 'true'
25+
run: npm ci
2726
shell: bash

.github/workflows/ci.yml

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,10 @@ jobs:
2121
uses: ./.github/actions/setup
2222

2323
- name: Lint files
24-
run: yarn lint
24+
run: npm run lint
2525

2626
- name: Typecheck files
27-
run: yarn typecheck
28-
29-
test:
30-
runs-on: ubuntu-latest
31-
steps:
32-
- name: Checkout
33-
uses: actions/checkout@v3
34-
35-
- name: Setup
36-
uses: ./.github/actions/setup
37-
38-
- name: Run unit tests
39-
run: yarn test --maxWorkers=2 --coverage
27+
run: npm run typecheck
4028

4129
build-library:
4230
runs-on: ubuntu-latest
@@ -48,7 +36,7 @@ jobs:
4836
uses: ./.github/actions/setup
4937

5038
- name: Build package
51-
run: yarn prepare
39+
run: npm run prepare
5240

5341
build-android:
5442
runs-on: ubuntu-latest
@@ -57,7 +45,8 @@ jobs:
5745
steps:
5846
- name: Checkout
5947
uses: actions/checkout@v3
60-
48+
with:
49+
submodules: 'recursive'
6150
- name: Setup
6251
uses: ./.github/actions/setup
6352

@@ -104,7 +93,7 @@ jobs:
10493
env:
10594
JAVA_OPTS: "-XX:MaxHeapSize=6g"
10695
run: |
107-
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"
96+
npm turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"
10897
10998
build-ios:
11099
runs-on: macos-14
@@ -154,4 +143,4 @@ jobs:
154143

155144
- name: Build example for iOS
156145
run: |
157-
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"
146+
npm turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"

expo-example/app/+html.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@ export default function Root({ children }: { children: React.ReactNode }) {
1010
<head>
1111
<meta charSet="utf-8" />
1212
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
13-
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
13+
<meta
14+
name="viewport"
15+
content="width=device-width, initial-scale=1, shrink-to-fit=no"
16+
/>
1417

15-
{/*
16-
Disable body scrolling on web. This makes ScrollView components work closer to how they do on native.
18+
{/*
19+
Disable body scrolling on web. This makes ScrollView components work closer to how they do on native.
1720
However, body scrolling is often nice to have for mobile web. If you want to enable it, remove this line.
1821
*/}
1922
<ScrollViewStyleReset />

expo-example/app/modal.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ export default function ModalScreen() {
88
return (
99
<View style={styles.container}>
1010
<Text style={styles.title}>Modal</Text>
11-
<View style={styles.separator} lightColor="#eee" darkColor="rgba(255,255,255,0.1)" />
11+
<View
12+
style={styles.separator}
13+
lightColor="#eee"
14+
darkColor="rgba(255,255,255,0.1)"
15+
/>
1216
<EditScreenInfo path="app/modal.tsx" />
1317

1418
{/* Use a light status bar on iOS to account for the black space above the modal */}

expo-example/babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = function (api) {
22
api.cache(true);
33
return {
4-
presets: ['babel-preset-expo']
4+
presets: ['babel-preset-expo'],
55
};
66
};

expo-example/cbl-reactnative-plugin.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,23 @@ function modifyXcodeProject(config) {
2020

2121
// Function to modify Podfile properties to include the native module podspec
2222
function includeNativeModulePod(config) {
23-
return withPodfileProperties(config, async (config) => {
23+
return withPodfileProperties(config, async (podConfig) => {
2424
// Assuming the path to the podspec is relative to the iOS directory in the Expo app
2525
// Adjust the path as necessary based on your project structure
2626
const podspecPath = `../../cbl-reactnative.podspec`;
27-
config.modResults.podfileProperties.pod(
27+
podConfig.modResults.podfileProperties.pod(
2828
`'cbl-reactnative', :path => '${podspecPath}'`
2929
);
30-
return config;
30+
return podConfig;
3131
});
3232
}
3333

3434
module.exports = (config) => {
35-
config = withProjectBuildGradle(config, async (config) => {
36-
return modifyAndroidBuildGradle(config);
35+
config = withProjectBuildGradle(config, async (gradleConfig) => {
36+
return modifyAndroidBuildGradle(gradleConfig);
3737
});
38-
config = withXcodeProject(config, async (config) => {
39-
return modifyXcodeProject(config);
38+
config = withXcodeProject(config, async (xcodeConfig) => {
39+
return modifyXcodeProject(xcodeConfig);
4040
});
4141
return config;
4242
};

expo-example/package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

expo-example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"jest": "^29.2.1",
4040
"jest-expo": "~51.0.3",
4141
"react-test-renderer": "18.2.0",
42-
"typescript": "~5.3.3"
42+
"typescript": "~5.2.0"
4343
},
4444
"private": true
4545
}

package-lock.json

Lines changed: 86 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)