Skip to content

Commit

Permalink
Merge branch 'master' into 89-update-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelbeltran authored Nov 7, 2024
2 parents ac0a73c + aa1c1e5 commit d228191
Show file tree
Hide file tree
Showing 58 changed files with 16,561 additions and 1,928 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/demo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Demo CI
on: [ push, pull_request ]
jobs:
demo-android-build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: demo
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Java
uses: actions/setup-java@v3
with:
java-version: 17
distribution: adopt
cache: gradle

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Run npm Install
run: npm install

- name: Build application
run: |
cd android
./gradlew assembleDebug
demo-ios-build:
runs-on: macos-latest
defaults:
run:
working-directory: demo
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Run npm Install
run: npm install

- name: Pod Install
working-directory: demo/ios
run: pod install

- name: Build application
run: npx react-native build-ios
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ yarn-error.log

#-----------------------------------------#

/demo/
/sdk/dist/
/sdk/node_modules/
/sdk/package-lock.json
Expand All @@ -82,7 +81,6 @@ docker/
*.tgz
*.xcuserstate
*.xcworkspacedata
*.plist
&.DS_Store
.idea
/sdk/android/.gradle
2 changes: 2 additions & 0 deletions demo/.bundle/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BUNDLE_PATH: "vendor/bundle"
BUNDLE_FORCE_RUBY_PLATFORM: 1
4 changes: 4 additions & 0 deletions demo/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
root: true,
extends: '@react-native',
};
74 changes: 74 additions & 0 deletions demo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# OSX
#
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
**/.xcode.env.local

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
*.hprof
.cxx/
*.keystore
!debug.keystore

# node.js
#
node_modules/
npm-debug.log
yarn-error.log

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

**/fastlane/report.xml
**/fastlane/Preview.html
**/fastlane/screenshots
**/fastlane/test_output

# Bundle artifact
*.jsbundle

# Ruby / CocoaPods
**/Pods/
/vendor/bundle/

# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*

# testing
/coverage

# Yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
7 changes: 7 additions & 0 deletions demo/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
arrowParens: 'avoid',
bracketSameLine: true,
bracketSpacing: false,
singleQuote: true,
trailingComma: 'all',
};
1 change: 1 addition & 0 deletions demo/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
9 changes: 9 additions & 0 deletions demo/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
source 'https://rubygems.org'

# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby ">= 2.6.10"

# Exclude problematic versions of cocoapods and activesupport that causes build failures.
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
gem 'xcodeproj', '< 1.26.0'
65 changes: 25 additions & 40 deletions demo/README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,25 @@
# Raygun4ReactNative Demo Application

## 1) Setup:
Start by downloading the Raygun4ReactNative repository into Webstorm or IDE of choice. </br>
### - Setting up device
To run the demo application, you need to implement some method of running a React-Naitve application.
This can be done through your phone, or a simulator

### 1.1) Device - iOS + Android
Go to this [link](https://reactnative.dev/docs/running-on-device) and follow the instructions.
Then skip to step 2.

### 1.2) Simulation - Windows + Linux
For Windows and Linux users, you can run a simulated Android device through
[**'Android Studio'**](https://developer.android.com/studio). You will need to [set up a virtual
device](https://developer.android.com/studio/run/managing-avds).

### 1.3) Simulation - MacOS
MacOS user will need to ensure Xcode is downloaded and setup, follow the first two steps ("Download + Setup" and
"install Node, Watchman and Expo") in this
[guide](https://medium.com/dev-genius/creating-apps-in-react-native-with-an-ios-simulator-39bab189bbee).


## 2) Run:
The base folder is split into two different sections, the **'demo'** and **'sdk'**. In the demo project,
there is a **'package.json'** file. Inside that file is a script that you can run call **'run_demo'**.</br>
</br>
_**raygun4reactnative -> demo -> package.json -> scripts: run_demo**_
</br>
</br>
This script has been implemented to clean up the repo, install dependencies, and run the application.
All of these steps can be done manually, however we highly suggest running this script. The script can
also be run from the terminal.
</br>
To run the **'run_demo'** script from the terminal, change directory such that your terminal is in the
demo folder. Then run the script as seen below:
```text
.../raygun4reactnative: cd demo
.../raygun4reactnative/demo: npm run run_demo
```
# Raygun4ReactNative Demo App

This folder contains the demo application for Raygun4ReactNative.

## Setup

We recommend using `npx` to setup and run this demo project.

Install with `npm install -g npx` if not present already in your system.

### Check configuration

Verify your system setup running `npx react-native doctor` and follow the instructions.

### Setup Raygun Options

Configure the `apiKey` from the `RaygunClientOptions` in the `screens/Home.tsx` file.

## Running

1. Run `npx react-native start` to launch the application.
2. Select options "run on iOS" or "run on Android".

This command will take care of starting any necessary background processes, launch an emulator if present, and build and start the app.

3 changes: 3 additions & 0 deletions demo/__tests__/App-test.tsx → demo/__tests__/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import 'react-native';
import React from 'react';
import App from '../App';

// Note: import explicitly to use the types shipped with jest.
import {it} from '@jest/globals';

// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';

Expand Down
55 changes: 0 additions & 55 deletions demo/android/app/_BUCK

This file was deleted.

Loading

0 comments on commit d228191

Please sign in to comment.