Skip to content

Commit 313d235

Browse files
Varniusviktorasl
andauthored
Expose SDK wrapper and update example app (#53)
* chore: expose SDK wrapper and update example app * Trigger auto QA tests using trigger-workflow-and-wait action --------- Co-authored-by: Viktoras Laukevičius <[email protected]>
1 parent eaa4872 commit 313d235

File tree

204 files changed

+20947
-16615
lines changed

Some content is hidden

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

204 files changed

+20947
-16615
lines changed

.buckconfig

-6
This file was deleted.

.flowconfig

-77
This file was deleted.

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.pbxproj -text

.github/CODEOWNERS

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Default owners for the whole repo
2+
* @argyle-systems/link-frontend

.github/dependabot.yaml

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
version: 2
22
updates:
3-
- package-ecosystem: github-actions
4-
directory: /
5-
schedule:
6-
interval: weekly
7-
rebase-strategy: disabled
8-
- package-ecosystem: npm
9-
directory: /
10-
schedule:
11-
interval: weekly
12-
rebase-strategy: disabled
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
rebase-strategy: disabled
8+
- package-ecosystem: npm
9+
directory: /
10+
schedule:
11+
interval: weekly
12+
rebase-strategy: disabled
+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: build-android-apk
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
install-and-test:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/[email protected]
11+
- name: Install npm dependencies
12+
run: |
13+
cd example
14+
npm install
15+
build:
16+
needs: install-and-test
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/[email protected]
20+
- name: Install npm dependencies
21+
run: |
22+
cd example
23+
npm install
24+
- name: Overwrite index.js
25+
run: |
26+
cd example
27+
rm index.js
28+
mv json-demo-build.js index.js
29+
- name: Overwrite node module
30+
run: |
31+
rsync -Rr . example/node_modules/@argyleio/argyle-plugin-react-native
32+
- name: Build Android Release
33+
run: |
34+
cd example/android
35+
./gradlew assembleRelease
36+
- name: Archive APK
37+
uses: actions/upload-artifact@v3
38+
with:
39+
name: apk-app-development-release
40+
path: example/android/app/build/outputs/apk/release/app-release.apk
41+
- name: Upload app to browserstack
42+
run: |
43+
curl -u ${{ secrets.BROWSERSTACK_USERNAME }}:${{ secrets.BROWSERSTACK_ACCESSKEY }} -X POST "https://api-cloud.browserstack.com/app-automate/upload" -F "file=@example/android/app/build/outputs/apk/release/app-release.apk" -F 'data={"custom_id": "android_react_latest"}'
44+
trigger-auto-tests:
45+
needs: build
46+
steps:
47+
- uses: convictional/[email protected]
48+
with:
49+
owner: argyle-systems
50+
repo: argyle-qa-mobile
51+
workflow_file_name: test_dev_rn_android.yaml
52+
ref: master
53+
client_payload: '{"id": "auto-trigger-android-rn-tests"}'
54+
github_token: ${{ secrets.GITHUB_TOKEN }}
55+
wait_workflow: true

.github/workflows/build-ios-ipa.yaml

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: build-ios-ipa
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
build:
8+
runs-on: macos-latest
9+
10+
steps:
11+
- uses: maxim-lobanov/setup-xcode@v1
12+
with:
13+
xcode-version: '14.2'
14+
15+
- uses: actions/[email protected]
16+
17+
- name: Install npm dependencies and add dummy version to package.json
18+
run: |
19+
sed -i.bak "s/%LINK_VERSION%/0.0.1/g" package.json
20+
cd example
21+
npm install
22+
23+
- name: Overwrite index.js
24+
run: |
25+
cd example
26+
rm index.js
27+
mv json-demo-build.js index.js
28+
29+
- name: Overwrite node module
30+
run: |
31+
rsync -Rr . example/node_modules/@argyleio/argyle-plugin-react-native
32+
33+
- name: Import Codesigning Certificate
34+
uses: apple-actions/import-codesign-certs@v1
35+
with:
36+
p12-file-base64: ${{ secrets.BUILD_ID_CERT_BASE64 }}
37+
p12-password: ${{ secrets.BUILD_ID_CERT_PASS }}
38+
39+
- name: Install Provisioning Profile
40+
uses: akiojin/[email protected]
41+
with:
42+
base64: ${{ secrets.BUILD_ID_PROVISIONING }}
43+
44+
- name: Cocoapods install
45+
run: |
46+
cd example/ios
47+
pod install
48+
49+
- name: Build App
50+
run: |
51+
cd example/ios
52+
xcodebuild -workspace LinkReactNative.xcworkspace -scheme LinkReactNative -configuration Release -sdk iphoneos -archivePath demo.xcarchive archive CODE_SIGN_STYLE=Manual
53+
xcodebuild -exportArchive -archivePath ./demo.xcarchive -exportOptionsPlist exportOptions.plist -exportPath build-demo
54+
55+
- name: Archive IPA
56+
uses: actions/upload-artifact@v3
57+
with:
58+
name: ipa-LinkReactNative
59+
path: example/ios/build-demo/LinkReactNative.ipa
60+
61+
- name: Upload app to browserstack
62+
run: |
63+
curl \
64+
-u ${{ secrets.BROWSERSTACK_USERNAME }}:${{ secrets.BROWSERSTACK_ACCESSKEY }} \
65+
-X POST "https://api-cloud.browserstack.com/app-automate/upload" \
66+
-F "file=@example/ios/build-demo/LinkReactNative.ipa" \
67+
-F 'data={"custom_id": "ios_react_latest"}'
68+
trigger-auto-tests:
69+
needs: build
70+
steps:
71+
- uses: convictional/[email protected]
72+
with:
73+
owner: argyle-systems
74+
repo: argyle-qa-mobile
75+
workflow_file_name: test_dev_rn_ios.yaml
76+
ref: master
77+
client_payload: '{"id": "auto-trigger-ios-rn-tests"}'
78+
github_token: ${{ secrets.GITHUB_TOKEN }}
79+
wait_workflow: true

.github/workflows/publish-sdk.yaml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: publish-sdk
2+
on:
3+
push:
4+
tags:
5+
- '*.*.*'
6+
jobs:
7+
publish-sdk:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/[email protected]
11+
12+
- uses: actions/[email protected]
13+
with:
14+
node-version: 16
15+
16+
- id: tag
17+
run: echo "DEPLOY_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
18+
19+
- name: Publish SDK
20+
run: |
21+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_PUBLISH_AUTH_TOKEN }}" >> .npmrc
22+
sed -i "s/%LINK_VERSION%/${{ steps.tag.outputs.DEPLOY_TAG }}/g" package.json
23+
npm publish

.gitignore

+10-28
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
#
33
.DS_Store
44

5+
# node.js
6+
#
7+
node_modules/
8+
npm-debug.log
9+
yarn-error.log
10+
511
# Xcode
612
#
713
build/
@@ -20,7 +26,8 @@ DerivedData
2026
*.hmap
2127
*.ipa
2228
*.xcuserstate
23-
xcshareddata
29+
project.xcworkspace
30+
/example/ios/LinkReactNative.xcarchive/
2431

2532
# Android/IntelliJ
2633
#
@@ -29,36 +36,11 @@ build/
2936
.gradle
3037
local.properties
3138
*.iml
32-
*.hprof
33-
34-
# node.js
35-
#
36-
node_modules/
37-
npm-debug.log
38-
yarn-error.log
3939

4040
# BUCK
4141
buck-out/
4242
\.buckd/
4343
*.keystore
44-
!debug.keystore
45-
46-
# fastlane
47-
#
48-
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
49-
# screenshots whenever they are needed.
50-
# For more information about the recommended setup visit:
51-
# https://docs.fastlane.tools/best-practices/source-control/
52-
53-
*/fastlane/report.xml
54-
*/fastlane/Preview.html
55-
*/fastlane/screenshots
56-
57-
# Bundle artifact
58-
*.jsbundle
59-
60-
# Ruby / CocoaPods
61-
/ios/Pods/
62-
/vendor/bundle/
6344

64-
.java-version
45+
# npm
46+
.npmrc

.node-version

-1
This file was deleted.

.npmignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
example/
2+
CODEOWNERS
3+
.gitattributes
4+
.idea/
5+
.github/
6+
scripts/

.prettierrc.js

-10
This file was deleted.

0 commit comments

Comments
 (0)