Skip to content

Commit 421d0cf

Browse files
authored
Initial commit
0 parents  commit 421d0cf

Some content is hidden

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

67 files changed

+12983
-0
lines changed

.github/template-cleanup.sh

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
IFS='/' read -ra REPOARR <<< "$GITHUB_REPOSITORY"
4+
echo "Repository: ${REPOARR[0]}"
5+
echo "Repository: ${REPOARR[1]}"
6+
7+
rm README.md
8+
mv .github/template-cleanup/README.md README.md
9+
rm .github/workflows/cleanup.yml
10+
rm .github/template-cleanup.sh
11+
sed -i -e "s~%REPOSITORY%~$GITHUB_REPOSITORY~g" README.md
12+
sed -i -e "s~%NAME%~${REPOARR[1]}~g" README.md

.github/template-cleanup/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# %NAME%
2+
3+
![Build](https://github.com/%REPOSITORY%/workflows/Pre%20Merge%20Checks/badge.svg)
4+
5+
This is your new React Native Reproducer project.
6+
7+
## Reproducer todo list
8+
9+
- [x] Create a new reproducer project.
10+
- [ ] Git clone your repository locally.
11+
- [ ] Edit the project to reproduce the failure you're seeing.
12+
- [ ] Push your changes, so that Github Actions can run the CI.
13+
- [ ] Make sure the repository is public and share the link with the issue you reported.

.github/workflows/auto-updater.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Auto Updater
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * *"
6+
workflow_dispatch:
7+
8+
jobs:
9+
daily-auto-update:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
if: github.repository == 'react-native-community/reproducer-react-native'
14+
15+
steps:
16+
- name: Checkout Repo
17+
uses: actions/checkout@v3
18+
19+
- name: Setup Node
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: 18
23+
24+
- name: Check React Native Version
25+
id: yarnoutdated
26+
working-directory: ReproducerApp
27+
run: yarn outdated react-native
28+
continue-on-error: true
29+
30+
- name: Re-create the reproducer
31+
id: recreate
32+
if: steps.yarnoutdated.outcome == 'failure'
33+
run: |
34+
rm -rf ReproducerApp
35+
npx react-native@latest init ReproducerApp --skip-install --skip-git-init
36+
cd ReproducerApp
37+
yarn config set -H enableImmutableInstalls false
38+
yarn
39+
git config --local user.email "[email protected]"
40+
git config --local user.name "GitHub Action"
41+
git add --all
42+
git commit -m "Update reproducer to latest React Native version"
43+
44+
- name: Push changes
45+
uses: ad-m/github-push-action@master
46+
if: steps.yarnoutdated.outcome == 'failure'
47+
with:
48+
branch: main
49+
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/cleanup.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# GitHub Actions Workflow responsible for cleaning up the template repository from
2+
# the template-specific files and configurations. This workflow is supposed to be triggered automatically
3+
# when a new template-based repository has been created.
4+
5+
name: Template Cleanup
6+
on:
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
template-cleanup:
13+
name: Template Cleanup
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
17+
if: github.repository != 'react-native-community/reproducer-react-native'
18+
steps:
19+
- name: Checkout Repo
20+
uses: actions/checkout@v3
21+
- name: Cleanup
22+
run: ./.github/template-cleanup.sh
23+
- name: Commit files
24+
run: |
25+
git config --local user.email "[email protected]"
26+
git config --local user.name "GitHub Action"
27+
git add --all
28+
git commit -m "Template cleanup"
29+
- name: Push changes
30+
uses: ad-m/github-push-action@master
31+
with:
32+
branch: main
33+
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pre-merge.yml

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Pre Merge Checks
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- "*"
10+
11+
jobs:
12+
test-android:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout Repo
16+
uses: actions/checkout@v3
17+
18+
- name: Setup Java
19+
uses: actions/setup-java@v3
20+
with:
21+
distribution: "zulu"
22+
java-version: "17"
23+
24+
- name: Setup Node
25+
uses: actions/setup-node@v3
26+
with:
27+
node-version: 18
28+
29+
- name: Setup Gradle
30+
uses: gradle/gradle-build-action@v2
31+
32+
- name: Yarn Install
33+
run: yarn install
34+
working-directory: ReproducerApp
35+
36+
- name: Yarn Build Android Debug
37+
run: yarn react-native build-android
38+
working-directory: ReproducerApp
39+
40+
- name: Yarn Build Android Release
41+
run: yarn react-native build-android --mode=Release
42+
working-directory: ReproducerApp
43+
44+
test-ios:
45+
runs-on: macos-latest
46+
steps:
47+
- name: Checkout Repo
48+
uses: actions/checkout@v3
49+
50+
- name: Setup Node
51+
uses: actions/setup-node@v3
52+
with:
53+
node-version: 18
54+
55+
- name: Setup XCode
56+
uses: maxim-lobanov/setup-xcode@v1
57+
with:
58+
xcode-version: 15.3.x
59+
60+
- name: Yarn Install
61+
run: yarn install
62+
working-directory: ReproducerApp
63+
64+
- name: pod install
65+
run: pod install
66+
working-directory: ReproducerApp/ios
67+
68+
- name: Yarn Build iOS
69+
run: yarn react-native build-ios
70+
working-directory: ReproducerApp

LICENSE

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2023 <Source Code Author>
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# React Native Reproducer
2+
3+
This is the React Native **reproducer** template.
4+
5+
You can use this template to create a minimal, complete, and reproducible project that the community can use to understand what's your problem. You can read more about the principles of a good reproducible project [here](https://stackoverflow.com/help/mcve).
6+
7+
This template is up to date with `react-native@latest` as you can find it on [npm](https://www.npmjs.com/package/react-native/v/latest).
8+
9+
## How to use this repository
10+
11+
1. Click on [![Use this template](https://img.shields.io/badge/-Use%20this%20template-brightgreen)](https://github.com/cortinico/reproducer-react-native/generate) button to create a new repository starting from this one.
12+
2. Git clone your repository locally.
13+
3. Edit the project to reproduce the failure you're seeing.
14+
4. Push your changes, so that Github Actions can run the CI.

ReproducerApp/.bundle/config

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BUNDLE_PATH: "vendor/bundle"
2+
BUNDLE_FORCE_RUBY_PLATFORM: 1

ReproducerApp/.eslintrc.js

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

ReproducerApp/.gitignore

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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+
37+
# node.js
38+
#
39+
node_modules/
40+
npm-debug.log
41+
yarn-error.log
42+
43+
# fastlane
44+
#
45+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
46+
# screenshots whenever they are needed.
47+
# For more information about the recommended setup visit:
48+
# https://docs.fastlane.tools/best-practices/source-control/
49+
50+
**/fastlane/report.xml
51+
**/fastlane/Preview.html
52+
**/fastlane/screenshots
53+
**/fastlane/test_output
54+
55+
# Bundle artifact
56+
*.jsbundle
57+
58+
# Ruby / CocoaPods
59+
**/Pods/
60+
/vendor/bundle/
61+
62+
# Temporary files created by Metro to check the health of the file watcher
63+
.metro-health-check*
64+
65+
# testing
66+
/coverage
67+
68+
# Yarn
69+
.yarn/*
70+
!.yarn/patches
71+
!.yarn/plugins
72+
!.yarn/releases
73+
!.yarn/sdks
74+
!.yarn/versions

ReproducerApp/.prettierrc.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
arrowParens: 'avoid',
3+
bracketSameLine: true,
4+
bracketSpacing: false,
5+
singleQuote: true,
6+
trailingComma: 'all',
7+
};

ReproducerApp/.watchmanconfig

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

ReproducerApp/.yarn/releases/yarn-3.6.4.cjs

+874
Large diffs are not rendered by default.

ReproducerApp/.yarnrc.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nodeLinker: node-modules
2+
3+
yarnPath: .yarn/releases/yarn-3.6.4.cjs

0 commit comments

Comments
 (0)