Skip to content

Commit 077d026

Browse files
troZeePiotr Trocki
andauthored
sync with master (#756)
Co-authored-by: Piotr Trocki <[email protected]>
1 parent cb2f01d commit 077d026

File tree

80 files changed

+6542
-6564
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+6542
-6564
lines changed
Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Install dependencies
2-
description: "Installs and caches the dependencies"
3-
2+
description: 'Installs and caches the dependencies'
3+
44
runs:
5-
using: "composite"
5+
using: 'composite'
66
steps:
77
- name: Install dependencies
88
shell: bash
@@ -28,18 +28,3 @@ runs:
2828
shell: bash
2929
run: yarn install --frozen-lockfile
3030
working-directory: example
31-
32-
- name: Cache fabric example node modules
33-
id: cache-fabricexample-npm
34-
uses: actions/cache@v3
35-
env:
36-
cache-name: cached-fabric-npm-deps
37-
with:
38-
path: fabricexample/node_modules
39-
key: ${{ hashFiles('./fabricexample/yarn.lock') }}-${{ hashFiles('./yarn.lock') }}
40-
41-
- name: Install required fabric example dependencies on yarn.lock change
42-
if: steps.cache-fabricexample-npm.outputs.cache-hit != 'true'
43-
shell: bash
44-
run: yarn install --frozen-lockfile
45-
working-directory: fabricexample

.github/workflows/android.yml

Lines changed: 26 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,17 @@ on:
88
- '.github/workflows/android.yml'
99
- 'android/**'
1010
- 'example/android/**'
11-
- 'fabricexample/android/**'
1211
push:
1312
branches:
1413
- master
1514

16-
17-
concurrency:
15+
concurrency:
1816
group: ${{ github.ref }}-android
1917
cancel-in-progress: true
2018

2119
jobs:
2220
android-build:
23-
runs-on: ubuntu-latest
21+
runs-on: macos-latest
2422
steps:
2523
- uses: actions/checkout@v3
2624
- uses: ./.github/actions/install-dependencies
@@ -42,51 +40,36 @@ jobs:
4240

4341
- name: Install required example dependencies on yarn.lock change
4442
if: steps.cache-example-npm.outputs.cache-hit != 'true'
45-
run: yarn install --frozen-lockfile
46-
working-directory: example
43+
run: yarn bootstrap-no-pods --frozen-lockfile
4744

4845
- uses: actions/setup-java@v3
4946
with:
50-
distribution: "zulu"
51-
java-version: "11"
52-
53-
- name: Build Android
54-
run: ./gradlew assembleDebug
55-
working-directory: example/android
56-
57-
android-build-fabric:
58-
runs-on: ubuntu-latest
59-
needs: android-build
60-
steps:
61-
- uses: actions/checkout@v3
62-
- uses: ./.github/actions/install-dependencies
47+
distribution: 'zulu'
48+
java-version: '11'
6349

64-
- name: Pull dependencies
50+
- name: Gradle cache
6551
uses: actions/cache@v3
6652
with:
67-
path: ./node_modules
68-
key: ${{ hashFiles('./package.json') }}
53+
path: |
54+
~/.gradle/caches
55+
~/.gradle/wrapper
56+
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }}
6957

70-
- name: Cache fabric example node modules
71-
id: cache-fabricexample-npm
72-
uses: actions/cache@v3
73-
env:
74-
cache-name: cached-fabric-npm-deps
75-
with:
76-
path: fabricexample/node_modules
77-
key: ${{ hashFiles('./fabricexample/yarn.lock') }}-${{ hashFiles('./yarn.lock') }}
78-
79-
- name: Install required fabric example dependencies on yarn.lock change
80-
if: steps.cache-fabricexample-npm.outputs.cache-hit != 'true'
81-
shell: bash
82-
run: yarn install --frozen-lockfile
83-
working-directory: fabricexample
58+
- name: Install Maestro CLI
59+
run: export MAESTRO_VERSION=1.21.3; curl -Ls "https://get.maestro.mobile.dev" | bash
8460

85-
- uses: actions/setup-java@v3
86-
with:
87-
distribution: "zulu"
88-
java-version: "11"
61+
- name: Add Maestro to path
62+
run: echo "${HOME}/.maestro/bin" >> $GITHUB_PATH
8963

90-
- name: Build Android (Fabric)
91-
run: ./gradlew assembleDebug -PreactNativeArchitectures=arm64-v8a
92-
working-directory: fabricexample/android
64+
- name: Run Android Emulator and app
65+
uses: reactivecircus/android-emulator-runner@v2
66+
with:
67+
api-level: 29
68+
arch: x86_64
69+
target: google_apis
70+
force-avd-creation: false
71+
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
72+
disable-animations: true
73+
script: |
74+
yarn run-example-android
75+
yarn test:e2e:android

.github/workflows/ios.yml

Lines changed: 15 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ on:
88
- '.github/workflows/ios.yml'
99
- 'ios/**'
1010
- 'example/ios/**'
11-
- 'fabricexample/ios/**'
12-
push:
13-
branches:
11+
push:
12+
branches:
1413
- master
1514

1615
concurrency:
@@ -57,51 +56,19 @@ jobs:
5756
run: NO_FLIPPER=1 pod install
5857
working-directory: example/ios
5958

60-
- name: Build iOS
61-
run: xcodebuild -scheme PagerViewExample -workspace PagerViewExample.xcworkspace -sdk iphonesimulator -configuration Debug COMPILER_INDEX_STORE_ENABLE=NO
62-
working-directory: example/ios
63-
64-
ios-build-fabric:
65-
needs: ios-build
66-
runs-on: macos-latest
67-
steps:
68-
- uses: actions/checkout@v3
69-
- uses: ./.github/actions/install-dependencies
59+
- name: Install Maestro CLI
60+
run: |
61+
curl -Ls "https://get.maestro.mobile.dev" | bash
62+
brew tap facebook/fb
63+
brew install facebook/fb/idb-companion
7064
71-
- name: Pull dependencies
72-
uses: actions/cache@v3
73-
with:
74-
path: ./node_modules
75-
key: ${{ hashFiles('./package.json') }}
65+
- name: Add Maestro to path
66+
run: echo "${HOME}/.maestro/bin" >> $GITHUB_PATH
7667

77-
- name: Cache fabric example node modules
78-
id: cache-fabricexample-npm
79-
uses: actions/cache@v3
80-
env:
81-
cache-name: cached-fabric-npm-deps
82-
with:
83-
path: fabricexample/node_modules
84-
key: ${{ hashFiles('./fabricexample/yarn.lock') }}-${{ hashFiles('./yarn.lock') }}
85-
86-
- name: Install required fabric example dependencies on yarn.lock change
87-
if: steps.cache-fabricexample-npm.outputs.cache-hit != 'true'
88-
shell: bash
89-
run: yarn install --frozen-lockfile
90-
working-directory: fabricexample
91-
92-
- name: Cache FabricExample Pods
93-
id: cache-pods-fabric
94-
uses: actions/cache@v3
95-
env:
96-
cache-name: cached-ios-pods-deps-fabric
97-
with:
98-
path: fabricexample/ios/Pods
99-
key: ${{ hashFiles('./fabricexample/ios/Podfile.lock') }}
100-
101-
- name: Install FabricExample Pods
102-
run: NO_FLIPPER=1 pod install
103-
working-directory: fabricexample/ios
68+
- name: Build iOS App
69+
run: |
70+
yarn run-example-ios
10471
105-
- name: Build iOS (Fabric)
106-
run: xcodebuild -scheme FabricExample -workspace FabricExample.xcworkspace -sdk iphonesimulator -configuration Debug COMPILER_INDEX_STORE_ENABLE=NO
107-
working-directory: fabricexample/ios
72+
- name: Run tests
73+
run: |
74+
yarn test:e2e:ios

.github/workflows/main.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ on:
1010
- master
1111
- next
1212

13-
concurrency:
13+
concurrency:
1414
group: ${{ github.ref }}-js
1515
cancel-in-progress: true
1616

1717
jobs:
18-
install-dependencies:
18+
install-dependencies:
1919
name: Install dependencies
2020
runs-on: ubuntu-latest
21-
steps:
21+
steps:
2222
- name: Checkout repository
2323
uses: actions/checkout@v3
24-
- name: Install dependencies
24+
- name: Install dependencies
2525
uses: ./.github/actions/install-dependencies
2626

2727
verify-package-source:
@@ -47,20 +47,11 @@ jobs:
4747
path: example/node_modules
4848
key: ${{ hashFiles('./example/yarn.lock') }}-${{ hashFiles('./yarn.lock') }}
4949

50-
- name: Pull fabric example node modules
51-
id: cache-fabricexample-npm
52-
uses: actions/cache@v3
53-
env:
54-
cache-name: cached-fabric-npm-deps
55-
with:
56-
path: fabricexample/node_modules
57-
key: ${{ hashFiles('./fabricexample/yarn.lock') }}-${{ hashFiles('./yarn.lock') }}
58-
5950
- name: Lint files
6051
run: yarn lint
6152

6253
- name: Typecheck files
6354
run: yarn typescript
6455

6556
- name: Build package
66-
run: yarn prepare
57+
run: yarn prepare

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,10 @@ example/vendor
6767
fabricexample/ios/Pods
6868
fabricexample/vendor
6969
fabricexample/android/app/.cxx
70+
.lefthookrc
71+
lefthook.yml
72+
73+
74+
# Temporary files created by Metro to check the health of the file watcher
75+
.metro-health-check*
76+
.cxx

android/src/main/java/com/reactnativepagerview/event/PageSelectedEvent.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ class PageSelectedEvent(viewTag: Int, private val mPosition: Int) : Event<PageSe
1717
return EVENT_NAME
1818
}
1919

20+
override fun canCoalesce(): Boolean {
21+
return false
22+
}
23+
2024
override fun dispatch(rctEventEmitter: RCTEventEmitter) {
2125
rctEventEmitter.receiveEvent(viewTag, eventName, serializeEventData())
2226
}

example/.buckconfig

Lines changed: 0 additions & 6 deletions
This file was deleted.

example/.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18

example/Gemfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
source 'https://rubygems.org'
22

33
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4-
ruby '2.7.5'
5-
6-
gem 'cocoapods', '~> 1.11', '>= 1.11.2'
4+
ruby '>= 2.6.10'
5+
gem 'cocoapods', '>= 1.11.3'

example/Gemfile.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ GEM
33
specs:
44
CFPropertyList (3.0.5)
55
rexml
6-
activesupport (6.1.7)
6+
activesupport (6.1.7.3)
77
concurrent-ruby (~> 1.0, >= 1.0.2)
88
i18n (>= 1.6, < 2)
99
minitest (>= 5.1)
@@ -54,7 +54,7 @@ GEM
5454
netrc (~> 0.11)
5555
cocoapods-try (1.2.0)
5656
colored2 (3.1.2)
57-
concurrent-ruby (1.1.10)
57+
concurrent-ruby (1.2.2)
5858
escape (0.0.4)
5959
ethon (0.15.0)
6060
ffi (>= 1.15.0)
@@ -66,7 +66,7 @@ GEM
6666
i18n (1.12.0)
6767
concurrent-ruby (~> 1.0)
6868
json (2.6.2)
69-
minitest (5.16.3)
69+
minitest (5.18.0)
7070
molinillo (0.8.0)
7171
nanaimo (0.3.0)
7272
nap (1.1.0)
@@ -76,7 +76,7 @@ GEM
7676
ruby-macho (2.5.1)
7777
typhoeus (1.4.0)
7878
ethon (>= 0.9.0)
79-
tzinfo (2.0.5)
79+
tzinfo (2.0.6)
8080
concurrent-ruby (~> 1.0)
8181
xcodeproj (1.22.0)
8282
CFPropertyList (>= 2.3.3, < 4.0)
@@ -85,13 +85,13 @@ GEM
8585
colored2 (~> 3.1)
8686
nanaimo (~> 0.3.0)
8787
rexml (~> 3.2.4)
88-
zeitwerk (2.6.0)
88+
zeitwerk (2.6.7)
8989

9090
PLATFORMS
9191
ruby
9292

9393
DEPENDENCIES
94-
cocoapods (~> 1.11, >= 1.11.2)
94+
cocoapods (>= 1.11.3)
9595

9696
RUBY VERSION
9797
ruby 2.7.5p203

0 commit comments

Comments
 (0)