Skip to content

Commit dce6945

Browse files
authored
[Monorepo] Fix CI paths (#3497)
## Description This PR updates paths used in github actions. Here we should focus on paths that are responsible for building example apps, linter will be fixed in upcoming PRs ## Test plan Check CIs
1 parent a7b7787 commit dce6945

10 files changed

Lines changed: 46 additions & 46 deletions

File tree

.github/workflows/android-build.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@ on:
33
pull_request:
44
paths:
55
- '.github/workflows/android-build.yml'
6-
- 'android/**'
7-
- 'Common/**'
8-
- 'example/android/**'
9-
- 'FabricExample/android/**'
6+
- 'packages/react-native-gesture-handler/android/**'
7+
- 'apps/BasicExample/android/**'
108
push:
119
branches:
1210
- main
@@ -17,7 +15,7 @@ jobs:
1715
runs-on: ubuntu-latest
1816
strategy:
1917
matrix:
20-
working-directory: [example, FabricExample]
18+
working-directory: [apps/BasicExample, apps/ExpoExample]
2119
concurrency:
2220
group: android-${{ matrix.working-directory }}-${{ github.ref }}
2321
cancel-in-progress: true
@@ -36,7 +34,7 @@ jobs:
3634
cache: 'yarn'
3735
- name: Install node dependencies
3836
working-directory: ${{ matrix.working-directory }}
39-
run: yarn
37+
run: yarn install --immutable && yarn postinstall
4038
- name: Build app
4139
working-directory: ${{ matrix.working-directory }}/android
4240
run: ./gradlew assembleDebug --console=plain -PreactNativeArchitectures=arm64-v8a

.github/workflows/docs-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Check documentation
33
on:
44
pull_request:
55
paths:
6-
- 'docs/**'
6+
- 'packages/docs-gesture-handler/**'
77
workflow_dispatch:
88

99
jobs:
@@ -14,7 +14,7 @@ jobs:
1414
group: docs-check-${{ github.ref }}
1515
cancel-in-progress: true
1616
env:
17-
WORKING_DIRECTORY: docs
17+
WORKING_DIRECTORY: packages/docs-gesture-handler
1818
steps:
1919
- name: checkout
2020
uses: actions/checkout@v4

.github/workflows/ios-build.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ on:
33
pull_request:
44
paths:
55
- '.github/workflows/ios-build.yml'
6-
- 'RNGestureHandler.podspec'
7-
- 'apple/**'
8-
- 'example/ios/**'
9-
- 'FabricExample/ios/**'
6+
- 'packages/react-native-gesture-handler/RNGestureHandler.podspec'
7+
- 'packages/react-native-gesture-handler/apple/**'
8+
- 'apps/BasicExample/ios/**'
109
push:
1110
branches:
1211
- main
@@ -17,10 +16,12 @@ jobs:
1716
runs-on: macos-14
1817
strategy:
1918
matrix:
20-
working-directory: [example, FabricExample]
19+
working-directory: [apps/BasicExample, apps/ExpoExample]
2120
concurrency:
2221
group: ios-${{ matrix.working-directory }}-${{ github.ref }}
2322
cancel-in-progress: true
23+
env:
24+
WORKING_DIRECTORY: apps/BasicExample
2425
steps:
2526
- name: checkout
2627
uses: actions/checkout@v4
@@ -35,8 +36,9 @@ jobs:
3536
cache: 'yarn'
3637
- name: Install node dependencies
3738
working-directory: ${{ matrix.working-directory }}
38-
run: yarn install --immutable
39+
run: yarn install --immutable && yarn postinstall
3940
- name: Install pods
41+
if: ${{ matrix.working-directory == 'apps/BasicExample' }}
4042
working-directory: ${{ matrix.working-directory }}/ios
4143
run: bundle install && NO_FLIPPER=1 bundle exec pod install
4244
- name: Build app

.github/workflows/kotlin-lint.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Kotlin Lint
22
on:
33
pull_request:
44
paths:
5-
- 'android/**'
5+
- 'packages/react-native-gesture-handler/android/**'
66
push:
77
branches:
88
- main
@@ -14,6 +14,8 @@ jobs:
1414
concurrency:
1515
group: kotlin-lint-${{ github.ref }}
1616
cancel-in-progress: true
17+
env:
18+
WORKING_DIRECTORY: 'packages/react-native-gesture-handler'
1719
steps:
1820
- name: checkout
1921
uses: actions/checkout@v4
@@ -44,9 +46,9 @@ jobs:
4446
path: |
4547
~/.gradle/caches
4648
~/.gradle/wrapper
47-
android/build
48-
android/.gradle
49-
key: ${{ runner.os }}-kotlin-lint-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'android/build.gradle') }}
49+
${{ env.WORKING_DIRECTORY }}/android/build
50+
${{ env.WORKING_DIRECTORY }}/android/.gradle
51+
key: ${{ runner.os }}-kotlin-lint-gradle-${{ hashFiles('${{ env.WORKING_DIRECTORY }}/**/*.gradle*', '${{ env.WORKING_DIRECTORY }}/**/gradle-wrapper.properties', '${{ env.WORKING_DIRECTORY }}/android/build.gradle') }}
5052

5153
- name: Lint
52-
run: yarn lint:android
54+
run: yarn workspace react-native-gesture-handler lint:android

.github/workflows/macos-build.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ on:
33
pull_request:
44
paths:
55
- '.github/workflows/macos-build.yml'
6-
- 'RNGestureHandler.podspec'
7-
- 'apple/**'
8-
- 'MacOSExample/macos/**'
6+
- 'packages/react-native-gesture-handler/RNGestureHandler.podspec'
7+
- 'packages/react-native-gesture-handler/apple/**'
8+
- 'apps/MacOSExample/macos/**'
99
push:
1010
branches:
1111
- main
@@ -14,12 +14,8 @@ jobs:
1414
build:
1515
if: github.repository == 'software-mansion/react-native-gesture-handler'
1616
runs-on: macos-15
17-
strategy:
18-
matrix:
19-
working-directory: [MacOSExample]
20-
concurrency:
21-
group: macos-${{ matrix.working-directory }}-${{ github.ref }}
22-
cancel-in-progress: true
17+
env:
18+
WORKING_DIRECTORY: apps/MacOSExample
2319
steps:
2420
- name: checkout
2521
uses: actions/checkout@v4
@@ -29,11 +25,11 @@ jobs:
2925
node-version: 22
3026
cache: 'yarn'
3127
- name: Install node dependencies
32-
working-directory: ${{ matrix.working-directory }}
28+
working-directory: ${{ env.WORKING_DIRECTORY }}
3329
run: yarn
3430
- name: Install pods
35-
working-directory: ${{ matrix.working-directory }}/macos
36-
run: pod install
31+
working-directory: ${{ env.WORKING_DIRECTORY }}/macos
32+
run: bundle install && bundle exec pod install
3733
- name: Build app
38-
working-directory: ${{ matrix.working-directory }}
39-
run: yarn macos
34+
working-directory: ${{ env.WORKING_DIRECTORY }}
35+
run: npx react-native-macos run-macos

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ jobs:
1717
run: >-
1818
git config --local user.email "action@github.com"
1919
&& git config --local user.name "GitHub Action"
20-
&& cd docs
20+
&& cd packages/docs-gesture-handler
2121
&& yarn
2222
&& yarn build
2323
2424
- name: Publish generated content to GitHub Pages
2525
uses: JamesIves/github-pages-deploy-action@releases/v3
2626
with:
27-
FOLDER: docs/build
27+
FOLDER: packages/docs-gesture-handler/build
2828
BRANCH: gh-pages
2929
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/static-example-apps-checks.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: Test TypeScript and Lint
22
on:
33
pull_request:
44
paths:
5-
- 'example/**'
6-
- 'FabricExample/**'
5+
- 'apps/BasicExample/**'
6+
- 'apps/CommonApp/**'
77
push:
88
branches:
99
- main
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
working-directory: [example, FabricExample]
17+
working-directory: [apps/BasicExample, apps/CommonApp]
1818
concurrency:
1919
group: typescript-${{ matrix.working-directory }}-${{ github.ref }}
2020
cancel-in-progress: true

.github/workflows/static-root-checks.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: Test TypeScript and Lint
22
on:
33
pull_request:
44
paths:
5-
- 'src/**'
6-
- '*'
5+
- 'packages/react-native-gesture-handler/src/**'
6+
- 'packages/react-native-gesture-handler/*'
77
push:
88
branches:
99
- main
@@ -13,7 +13,7 @@ jobs:
1313
if: github.repository == 'software-mansion/react-native-gesture-handler'
1414
runs-on: ubuntu-latest
1515
env:
16-
RNGH_DIR: 'packages/react-native-gesture-handler'
16+
WORKING_DIRECTORY: 'packages/react-native-gesture-handler'
1717
concurrency:
1818
group: static-root-${{ github.ref }}
1919
cancel-in-progress: true
@@ -28,11 +28,11 @@ jobs:
2828
- name: Install node dependencies
2929
run: yarn
3030
- name: Check types
31-
working-directory: ${{ env.RNGH_DIR }}
31+
working-directory: ${{ env.WORKING_DIRECTORY }}
3232
run: yarn tsc --noEmit
3333
- name: Lint
34-
working-directory: ${{ env.RNGH_DIR }}
34+
working-directory: ${{ env.WORKING_DIRECTORY }}
3535
run: yarn lint:js-root
3636
- name: Check for circular dependencies
37-
working-directory: ${{ env.RNGH_DIR }}
37+
working-directory: ${{ env.WORKING_DIRECTORY }}
3838
run: yarn circular-dependency-check

apps/BasicExample/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"ios": "react-native run-ios",
88
"lint": "eslint .",
99
"start": "react-native start",
10-
"test": "jest"
10+
"test": "jest",
11+
"postinstall": ""
1112
},
1213
"dependencies": {
1314
"react": "19.0.0",

apps/ExpoExample/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"start": "expo start",
77
"android": "expo run:android",
88
"ios": "expo run:ios",
9-
"web": "expo start --web"
9+
"web": "expo start --web",
10+
"postinstall": "npx expo prebuild"
1011
},
1112
"dependencies": {
1213
"@expo/metro-runtime": "~5.0.2",

0 commit comments

Comments
 (0)