Skip to content

Commit cc39260

Browse files
authored
chore: Bring back Example for Paper (#3664)
Closes software-mansion/react-native-screens-labs#971 ## Description We're decided to defer the removal of Paper Example. We'll still be needing it for some time. Since the tests are failing on GH runners nondeterministically, we're skipping them. We don't want to put more time to it & the app will only exist for manual checks on PRs. ## Changes Reverted the removal of Example. Not reverted: - e2e workflow files - string instances of ScreensExample ## Test plan Build the Paper Example and see if it works. ## Checklist - [x] Ensured that CI passes
1 parent 7d41086 commit cc39260

File tree

118 files changed

+17314
-5
lines changed

Some content is hidden

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

118 files changed

+17314
-5
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Test Android build
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
- main-labs
7+
paths:
8+
- 'android/**'
9+
- 'package.json'
10+
- 'Example/**'
11+
- '.github/workflows/android-build-test.yml'
12+
push:
13+
branches:
14+
- main
15+
- main-labs
16+
workflow_dispatch:
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
timeout-minutes: 60
21+
env:
22+
WORKING_DIRECTORY: Example
23+
RNS_GAMMA_ENABLED: 0
24+
concurrency:
25+
group: android-${{ github.ref }}
26+
cancel-in-progress: true
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
- name: Set up JDK 17
31+
uses: actions/setup-java@v4
32+
with:
33+
java-version: '17'
34+
distribution: 'zulu'
35+
cache: 'gradle'
36+
- name: Setup Node.js (version from .nvmrc)
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version-file: '.nvmrc'
40+
cache: 'yarn'
41+
cache-dependency-path: |
42+
yarn.lock
43+
${{ env.WORKING_DIRECTORY }}/yarn.lock
44+
- name: Install dependencies
45+
run: yarn
46+
- name: Install Example app dependencies
47+
working-directory: ${{ env.WORKING_DIRECTORY }}
48+
run: yarn
49+
- name: Build app
50+
working-directory: ${{ env.WORKING_DIRECTORY }}/android
51+
run: ./gradlew assembleDebug --console=plain
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Test iOS build
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
- main-labs
7+
paths:
8+
- '.github/workflows/ios-build-test.yml'
9+
- 'RNScreens.podspec'
10+
- 'package.json'
11+
- 'ios/**'
12+
- 'common/**'
13+
- 'Example/**'
14+
push:
15+
branches:
16+
- main
17+
- main-labs
18+
workflow_dispatch:
19+
jobs:
20+
build:
21+
runs-on: macos-14
22+
timeout-minutes: 60
23+
env:
24+
WORKING_DIRECTORY: Example
25+
RNS_GAMMA_ENABLED: 0
26+
concurrency:
27+
group: ios-${{ github.ref }}
28+
cancel-in-progress: true
29+
steps:
30+
- name: checkout
31+
uses: actions/checkout@v4
32+
- name: Setup Node.js (version from .nvmrc)
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version-file: '.nvmrc'
36+
cache: 'yarn'
37+
cache-dependency-path: ${{ env.WORKING_DIRECTORY }}/yarn.lock
38+
- name: Use latest stable Xcode
39+
uses: maxim-lobanov/setup-xcode@v1
40+
with:
41+
xcode-version: '16.1'
42+
- name: Install node dependencies
43+
working-directory: ${{ env.WORKING_DIRECTORY }}
44+
run: yarn
45+
# This step is required due to the bug introduced in 1.15.0 version of cocoapods
46+
# that breaks the pod installation for cached packages.
47+
# see https://github.com/facebook/react-native/issues/42698
48+
# This step should be removed once this issue will be resolved:
49+
# https://github.com/actions/runner-images/issues/9308
50+
- name: Install Ruby gems
51+
run: gem install cocoapods -v 1.15.2
52+
- name: Install pods
53+
id: install_pods
54+
continue-on-error: true
55+
working-directory: ${{ env.WORKING_DIRECTORY }}/ios
56+
run: pod install
57+
- if: steps.install_pods.outcome == 'failure'
58+
id: remove_pods
59+
name: Remove pods
60+
working-directory: ${{ env.WORKING_DIRECTORY }}/ios
61+
run: rm -fr build Pods Podfile.lock
62+
- if: steps.remove_pods.outcome == 'success'
63+
id: reinstall_pods
64+
name: Reinstall pods
65+
working-directory: ${{ env.WORKING_DIRECTORY }}/ios
66+
run: pod install
67+
- name: Build app
68+
working-directory: ${{ env.WORKING_DIRECTORY }}
69+
run: npx react-native run-ios --no-packager --simulator="iPhone 15"

Example/.bundle/config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BUNDLE_PATH: "vendor/bundle"
2+
BUNDLE_FORCE_RUBY_PLATFORM: 1

Example/.detoxrc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
const utils = require('../scripts/e2e/detox-utils.cjs');
2+
module.exports = utils.commonDetoxConfigFactory('ScreensExample');

Example/.eslintrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
root: true,
3+
extends: '@react-native',
4+
};

Example/.gitignore

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# OSX
2+
#
3+
.DS_Store
4+
5+
# Xcode
6+
#
7+
build/
8+
*.pbxuser
9+
!default.pbxuser
10+
*.mode1v3
11+
!default.mode1v3
12+
*.mode2v3
13+
!default.mode2v3
14+
*.perspectivev3
15+
!default.perspectivev3
16+
xcuserdata
17+
*.xccheckout
18+
*.moved-aside
19+
DerivedData
20+
*.hmap
21+
*.ipa
22+
*.xcuserstate
23+
**/.xcode.env.local
24+
25+
# Android/IntelliJ
26+
#
27+
build/
28+
.idea
29+
.gradle
30+
local.properties
31+
*.iml
32+
*.hprof
33+
.cxx/
34+
*.keystore
35+
!debug.keystore
36+
.kotlin/
37+
38+
# node.js
39+
#
40+
node_modules/
41+
npm-debug.log
42+
yarn-error.log
43+
44+
# fastlane
45+
#
46+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47+
# screenshots whenever they are needed.
48+
# For more information about the recommended setup visit:
49+
# https://docs.fastlane.tools/best-practices/source-control/
50+
51+
*/fastlane/report.xml
52+
*/fastlane/Preview.html
53+
*/fastlane/screenshots
54+
**/fastlane/test_output
55+
56+
# Bundle artifact
57+
*.jsbundle
58+
59+
# Ruby / CocoaPods
60+
**/Pods/
61+
/vendor/bundle/
62+
63+
# Temporary files created by Metro to check the health of the file watcher
64+
.metro-health-check*
65+
66+
# testing
67+
/coverage
68+
69+
# Yarn
70+
.yarn/*
71+
!.yarn/patches
72+
!.yarn/plugins
73+
!.yarn/releases
74+
!.yarn/sdks
75+
!.yarn/versions
76+
77+
# Android cpatures
78+
/android/captures
79+
80+
# Detox
81+
artifacts/
82+

Example/.ruby-version

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

Example/.watchmanconfig

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

Example/App.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import App from '../apps';
2+
3+
export default App;

Example/Gemfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
source 'https://rubygems.org'
2+
3+
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4+
ruby ">= 2.6.10"
5+
6+
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
7+
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
8+
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
9+
gem 'xcodeproj', '< 1.26.0'
10+
11+
# Ruby 3.4.0 has removed some libraries from the standard library.
12+
gem 'bigdecimal'
13+
gem 'logger'
14+
gem 'benchmark'
15+
gem 'mutex_m'
16+
17+
# Necessary for the helper script regarding multi-window support in our applications
18+
gem 'plist'

0 commit comments

Comments
 (0)