Skip to content

Commit

Permalink
Check out native template
Browse files Browse the repository at this point in the history
  • Loading branch information
ablok committed Mar 21, 2023
1 parent 2edd9f2 commit c3636eb
Show file tree
Hide file tree
Showing 6 changed files with 210 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/actions/start-runtime/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ runs:
run: |
mkdir project
unzip -qq ${{ inputs.mda-file }} -d project
cp .github/configs/m2ee-native.yml project/m2ee-native.yml
cp configs/e2e/m2ee-native.yml project/m2ee-native.yml
sed -i -- 's=$ROOT_PATH=${{ github.workspace }}=g' project/m2ee-native.yml
sed -i -- 's=$JAVA_HOME=${{ steps.setup-java.outputs.path }}=g' project/m2ee-native.yml
shell: bash
Expand Down
57 changes: 35 additions & 22 deletions .github/workflows/NativePipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ jobs:
with:
node-version-file: .nvmrc
cache: yarn
cache-dependency-path: "**/yarn.lock"
- name: "Install dependencies"
run: yarn install --immutable --immutable-cache --check-cache
- name: "Unit test"
Expand Down Expand Up @@ -196,67 +195,83 @@ jobs:
- name: "Check out Native Template for Native Components Test Project"
uses: actions/[email protected]
with:
repository: mendix/native-content-test-app
ref: main
ssh-key: ${{ secrets.NATIVE_CONTENT_TEST_APP }}
repository: mendix/native-template
ref: master
path: native_template
- name: "Check out code"
uses: actions/[email protected]
with:
path: native_widgets
- name: "Download Android bundle and assets"
uses: actions/[email protected]
with:
name: android-bundle
path: bundles/android
- name: "Copy files to the right location"
run: |
mv bundles/android/index.android.bundle android/app/src/main/assets/index.android.bundle
cp -r bundles/android/assets/* android/app/src/main/res/
mv bundles/android/index.android.bundle native_template/android/app/src/main/assets/index.android.bundle
cp -r bundles/android/assets/* native_template/android/app/src/main/res/
mv native_widgets/configs/e2e/config.json native_template/
mv native_widgets/configs/e2e/.dependencies native_template/
mv native_widgets/configs/e2e/.native_dependencies native_template/
- name: "Set up Node"
uses: actions/[email protected]
with:
node-version: 14
node-version-file: .nvmrc
cache: npm
cache-dependency-path: "**/package-lock.json"
- name: "Install dependencies"
run: npm ci
- name: "Configure"
run: npm run configure
- name: "Setup JDK 11"
uses: actions/setup-java@16cca5479d7c6b6843f6a6515640ba33c6501543 #v3.4.0
uses: actions/setup-java@v3.10.0
with:
java-version: 11
distribution: temurin
cache: gradle
- name: "Build Android app"
working-directory: ./native_template/android
run: ./gradlew assembleAppstoreRelease assembleAndroidTest -DtestBuildType=release
working-directory: ./android
- name: "Archive Android app"
uses: actions/[email protected]
with:
name: android-app
path: android/app/build/outputs/apk/**/*.apk
path: native_template/android/app/build/outputs/apk/**/*.apk
ios-app:
needs: [ios-bundle]
runs-on: macos-12
steps:
- name: "Check out Native Template for Native Components Test Project"
uses: actions/[email protected]
with:
repository: mendix/native-content-test-app
ref: main
ssh-key: ${{ secrets.NATIVE_CONTENT_TEST_APP }}
repository: mendix/native-template
ref: master
path: native_template
- name: "Check out code"
uses: actions/[email protected]
with:
path: native_widgets
- name: "Download iOS bundle and assets"
uses: actions/[email protected]
with:
name: ios-bundle
path: bundles/ios
- name: "Copy files to the right location"
run: |
mv bundles/ios/index.ios.bundle ios/Bundle/index.ios.bundle
mv bundles/ios/assets/assets ios/Bundle/
mv bundles/ios/index.ios.bundle native_template/ios/Bundle/index.ios.bundle
mv bundles/ios/assets/assets native_template/ios/Bundle/
mv native_widgets/configs/e2e/config.json native_template/
mv native_widgets/configs/e2e/.dependencies native_template/
mv native_widgets/configs/e2e/.native_dependencies native_template/
- name: "Set up Node"
uses: actions/[email protected]
with:
node-version: 14
node-version-file: .nvmrc
cache: npm
cache-dependency-path: "**/package-lock.json"
- name: "Install Node dependencies"
run: npm ci
- name: "Configure"
run: npm run configure
- name: "Setup Pods cache"
uses: actions/[email protected]
with:
Expand All @@ -268,13 +283,13 @@ jobs:
run: pod install
working-directory: ./ios
- name: "Build iOS app"
working-directory: ./native_template/ios
run: xcodebuild -workspace NativeTemplate.xcworkspace -scheme nativeTemplate -configuration Debug -sdk iphonesimulator -derivedDataPath build
working-directory: ./ios
- name: "Archive iOS app"
uses: actions/[email protected]
with:
name: ios-app
path: ios/build/Build/Products/**/*.app
path: native_template/ios/build/Build/Products/**/*.app
android-avd:
runs-on: macos-12
steps:
Expand Down Expand Up @@ -316,7 +331,6 @@ jobs:
with:
node-version-file: .nvmrc
cache: yarn
cache-dependency-path: "**/yarn.lock"
- name: "Install dependencies"
run: yarn install --immutable --immutable-cache --check-cache
- name: "Download project MDA file"
Expand Down Expand Up @@ -402,7 +416,6 @@ jobs:
with:
node-version-file: .nvmrc
cache: yarn
cache-dependency-path: "**/yarn.lock"
- name: "Install dependencies"
run: yarn install --immutable --immutable-cache --check-cache
- name: "Download project MDA file"
Expand Down
14 changes: 14 additions & 0 deletions configs/e2e/.dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"react-native-maps": "0.31.1",
"react-native-geocoder": "0.5.0",
"react-native-action-button": "2.8.5",
"react-native-material-menu": "1.2.0",
"react-native-linear-gradient": "2.5.6",
"@react-native-community/netinfo": "5.9.7",
"@react-native-community/art": "1.2.0",
"react-native-system-navigation-bar": "1.0.2",
"react-native-camera": "3.40.0",
"react-native-view-shot": "3.1.2",
"react-native-blob-util": "0.16.2",
"react-native-file-viewer": "2.1.5"
}
20 changes: 20 additions & 0 deletions configs/e2e/.native_dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"react-native-maps": "0.31.1",
"react-native-geocoder": "0.5.0",
"react-native-device-info": "8.0.1",
"react-native-action-button": "2.8.5",
"react-native-material-menu": "1.2.0",
"react-native-linear-gradient": "2.5.6",
"@react-native-community/netinfo": "5.9.7",
"@react-native-community/art": "1.2.0",
"react-native-system-navigation-bar": "1.0.2",
"react-native-video": "5.2.1",
"@react-native-community/async-storage": "1.12.1",
"react-native-camera": "3.40.0",
"react-native-view-shot": "3.1.2",
"react-native-blob-util": "0.16.2",
"react-native-file-viewer": "2.1.5",
"react-native-localize": "1.4.2",
"react-native-image-picker": "5.0.1",
"react-native-permissions": "3.3.1"
}
140 changes: 140 additions & 0 deletions configs/e2e/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
{
"configVersion": 2,
"appIdentifier": "com.mendix.nativecomponentstestproject",
"appName": "NativeComponentsTestProject",
"bundleName": {
"main": "NativeComponent",
"dev": "NativeComponDev"
},
"deviceTarget": {
"phone": true,
"tablet": false
},
"orientation": {
"portrait": true,
"landscape": true
},
"permissions": [
{
"title": "Camera",
"name": "android.permission.CAMERA",
"platform": "android",
"required": false
},
{
"title": "Fine Location",
"name": "android.permission.ACCESS_FINE_LOCATION",
"platform": "android",
"required": false
},
{
"title": "Coarse Location",
"name": "android.permission.ACCESS_COARSE_LOCATION",
"platform": "android",
"required": false
},
{
"title": "Background Location",
"name": "android.permission.ACCESS_BACKGROUND_LOCATION",
"platform": "android",
"required": false
},
{
"title": "Location - When In Use Usage",
"name": "NSLocationWhenInUseUsageDescription",
"purpose": "To use that feature, the app needs access to your location.",
"platform": "ios",
"required": true
},
{
"title": "Location - Always And When in Use Usage",
"name": "NSLocationAlwaysAndWhenInUseUsageDescription",
"purpose": "To use that feature, the app needs access to your location.",
"platform": "ios",
"required": true
},
{
"title": "Camera Usage",
"name": "NSCameraUsageDescription",
"purpose": "The camera can be used to open apps by scanning a QR code.",
"platform": "ios",
"required": false
},
{
"title": "Internet",
"name": "android.permission.INTERNET",
"platform": "android",
"required": true
},
{
"title": "Read External Storage",
"name": "android.permission.READ_EXTERNAL_STORAGE",
"platform": "android",
"required": true
},
{
"title": "System Alert Window",
"name": "android.permission.SYSTEM_ALERT_WINDOW",
"platform": "android",
"required": true
},
{
"title": "Write External Storage",
"name": "android.permission.WRITE_EXTERNAL_STORAGE",
"platform": "android",
"required": true
},
{
"title": "Location - Always Usage",
"name": "NSLocationAlwaysUsageDescription",
"purpose": "To use that feature, the app needs access to your location.",
"platform": "ios",
"required": true
}
],
"capabilities": {
"deepLink": {
"value": "",
"enabled": false,
"android": {
"webLinks": [
{
"host": "",
"path": ""
}
]
}
},
"maps": {
"value": "test",
"enabled": true
},
"mapsIos": {
"enabled": false
},
"pushNotifications": {
"enabled": true
},
"crashlytics": {
"enabled": false
},
"firebaseAndroid": {
"enabled": true
},
"firebaseIos": {
"enabled": true
},
"localNotifications": {
"enabled": true
},
"appCenterOTA": {
"enabled": false
},
"nativeOTA": {
"enabled": false
}
},
"appVersion": "0.0.0",
"buildNumber": 1,
"runtimeUrl": "http://localhost:8080"
}
File renamed without changes.

0 comments on commit c3636eb

Please sign in to comment.