Skip to content

Commit d0ae2f5

Browse files
alduzymaciekstosiokkafar
authored andcommitted
refact: merge example and test example apps (software-mansion#2225)
## Description This PR intents to merge together the example and test-example apps resulting in less configuration files. TestsExample and FabricTestExample apps are removed so there's only Example, FabricExample and TVOSExample app to take care of. it is more convenient to use Example and FabricExample apps to run tests as there is less configuration files to take care of, less building and less metro restarting. Simply replace the returned component in `apps/App.tsx` with the selected test and you're ready for testing. For example replace `<Example/>` with `<Test.Test42/>`. ## Changes - removed TestsExample and FabricTestExample apps - allowed for source change in `apps/App.tsx` file to switch between example and tests <!-- ## Screenshots / GIFs Here you can add screenshots / GIFs documenting your change. You can add before / after section if you're changing some behavior. ### Before ### After --> ## Test code and steps to reproduce Run the Example or FabricExample app and change source in `apps/App.tsx` file. ## Checklist - [x] Updated documentation: <!-- For adding new props to native-stack --> - [x] https://github.com/software-mansion/react-native-screens/blob/main/guides/CONTRIBUTING.md - [x] Ensured that CI passes --------- Co-authored-by: maciekstosio <maciekstosio@icloud.com> Co-authored-by: Kacper Kafara <kacper.kafara@swmansion.com>
1 parent 7bb6d26 commit d0ae2f5

File tree

311 files changed

+157
-28288
lines changed

Some content is hidden

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

311 files changed

+157
-28288
lines changed

.github/workflows/android-build-test-fabric.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- 'android/**'
88
- 'common/**'
99
- 'src/fabric/**'
10-
- 'FabricTestExample/**'
10+
- 'FabricExample/**'
1111
- 'package.json'
1212
- '.github/workflows/android-build-test-fabric.yml'
1313
push:
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
timeout-minutes: 60
2121
env:
22-
WORKING_DIRECTORY: FabricTestExample
22+
WORKING_DIRECTORY: FabricExample
2323
concurrency:
2424
group: android-fabric-${{ github.ref }}
2525
cancel-in-progress: true
@@ -37,7 +37,7 @@ jobs:
3737
with:
3838
node-version: 18
3939
cache: 'yarn'
40-
cache-dependency-path: 'FabricTestExample/yarn.lock'
40+
cache-dependency-path: 'FabricExample/yarn.lock'
4141
- name: Install node dependencies
4242
working-directory: ${{ env.WORKING_DIRECTORY }}
4343
run: yarn

.github/workflows/android-build-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
paths:
77
- 'android/**'
88
- 'package.json'
9-
- 'TestsExample/**'
9+
- 'Example/**'
1010
- '.github/workflows/android-build-test.yml'
1111
push:
1212
branches:
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
timeout-minutes: 60
1919
env:
20-
WORKING_DIRECTORY: TestsExample
20+
WORKING_DIRECTORY: Example
2121
concurrency:
2222
group: android-${{ github.ref }}
2323
cancel-in-progress: true
@@ -35,7 +35,7 @@ jobs:
3535
with:
3636
node-version: 18
3737
cache: 'yarn'
38-
cache-dependency-path: 'TestsExample/yarn.lock'
38+
cache-dependency-path: 'Example/yarn.lock'
3939
- name: Install node dependencies
4040
working-directory: ${{ env.WORKING_DIRECTORY }}
4141
run: yarn

.github/workflows/ios-build-test-fabric.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
- 'ios/**'
1111
- 'common/**'
1212
- 'src/fabric/**'
13-
- 'FabricTestExample/**'
13+
- 'FabricExample/**'
1414
push:
1515
branches:
1616
- main
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: macos-14
2121
timeout-minutes: 60
2222
env:
23-
WORKING_DIRECTORY: FabricTestExample
23+
WORKING_DIRECTORY: FabricExample
2424
concurrency:
2525
group: ios-fabric-${{ github.ref }}
2626
cancel-in-progress: true
@@ -33,7 +33,7 @@ jobs:
3333
with:
3434
node-version: 18
3535
cache: 'yarn'
36-
cache-dependency-path: 'FabricTestExample/yarn.lock'
36+
cache-dependency-path: 'FabricExample/yarn.lock'
3737
- name: Use latest stable Xcode
3838
uses: maxim-lobanov/setup-xcode@v1
3939
with:

.github/workflows/ios-build-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- 'package.json'
1010
- 'ios/**'
1111
- 'common/**'
12-
- 'TestsExample/**'
12+
- 'Example/**'
1313
push:
1414
branches:
1515
- main
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: macos-14
2020
timeout-minutes: 60
2121
env:
22-
WORKING_DIRECTORY: TestsExample
22+
WORKING_DIRECTORY: Example
2323
concurrency:
2424
group: ios-${{ github.ref }}
2525
cancel-in-progress: true
@@ -31,7 +31,7 @@ jobs:
3131
with:
3232
node-version: 18
3333
cache: 'yarn'
34-
cache-dependency-path: 'TestsExample/yarn.lock'
34+
cache-dependency-path: 'Example/yarn.lock'
3535
- name: Use latest stable Xcode
3636
uses: maxim-lobanov/setup-xcode@v1
3737
with:

Example/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import App from '../apps/examples';
1+
import App from '../apps';
22

33
export default App;

Example/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/** @format */
21
import 'react-native-gesture-handler';
32
import { AppRegistry } from 'react-native';
43
import App from './App';

FabricExample/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import App from '../apps/examples';
1+
import App from '../apps';
22

33
export default App;

FabricExample/index.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/**
2-
* @format
3-
*/
4-
51
import {AppRegistry} from 'react-native';
62
import App from './App';
73
import {name as appName} from './app.json';

FabricTestExample/.bundle/config

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

FabricTestExample/.gitignore

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

0 commit comments

Comments
 (0)