-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MOO-1361] Add check and request EXACT_ALARM_PERMISSION to RequestGen…
…ericPermission (#137)
- Loading branch information
Showing
8 changed files
with
210 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,10 +32,10 @@ jobs: | |
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: "Check out code" | ||
uses: actions/checkout@v3.4.0 | ||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | ||
- name: "Get Mendix version" | ||
id: get-mendix-version | ||
uses: notiz-dev/[email protected] | ||
uses: notiz-dev/github-action-json-property@7a701887f4b568b23eb7b78bb0fc49aaeb1b68d3 # v0.2.0 | ||
with: | ||
path: configs/e2e/mendix-versions.json | ||
prop_path: latest | ||
|
@@ -48,7 +48,7 @@ jobs: | |
MENDIX_VERSION: ${{ needs.mendix-version.outputs.mendix-version }} | ||
steps: | ||
- name: "Login to GitHub Container Registry" | ||
uses: docker/login-action@v2.1.0 | ||
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
|
@@ -58,11 +58,11 @@ jobs: | |
docker manifest inspect ghcr.io/mendix/native-widgets/mxbuild:${{ env.MENDIX_VERSION }} || EXIT_CODE=$? | ||
echo "IMAGE_MISSING=$EXIT_CODE" >> $GITHUB_ENV | ||
- name: "Check out code" | ||
uses: actions/checkout@v3.4.0 | ||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | ||
if: ${{ env.IMAGE_MISSING != 0 }} | ||
- name: "Build mxbuild image" | ||
if: ${{ env.IMAGE_MISSING != 0 }} | ||
uses: docker/build-push-action@v4.0.0 | ||
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0 | ||
with: | ||
file: ./.github/scripts/mxbuild.Dockerfile | ||
context: ./.github/scripts | ||
|
@@ -79,11 +79,11 @@ jobs: | |
contents: read | ||
steps: | ||
- name: "Check out code" | ||
uses: actions/checkout@v3.4.0 | ||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: "Set up node" | ||
uses: actions/setup-node@v3.6.0 | ||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: yarn | ||
|
@@ -96,7 +96,7 @@ jobs: | |
env: | ||
NODE_OPTIONS: --max_old_space_size=6144 | ||
- name: "Upload resources artifact" | ||
uses: actions/upload-artifact@v3.1.2 | ||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | ||
with: | ||
name: resources | ||
path: | | ||
|
@@ -115,11 +115,11 @@ jobs: | |
- name: "Download test project" | ||
run: curl -L -o project.zip https://github.com/mendix/Native-Mobile-Resources/archive/refs/heads/main.zip | ||
- name: "Extract test project" | ||
uses: montudor/[email protected] | ||
uses: montudor/action-zip@0852c26906e00f8a315c704958823928d8018b28 # v1.0.0 | ||
with: | ||
args: unzip -qq project.zip | ||
- name: "Download resources artifact" | ||
uses: actions/download-artifact@v3.0.2 | ||
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | ||
with: | ||
name: resources | ||
path: resources | ||
|
@@ -146,9 +146,9 @@ jobs: | |
mv -f resources/jsActions/nanoflow-actions-native/* Native-Mobile-Resources-main/javascriptsource/nanoflowcommons/actions/ | ||
fi | ||
- name: "Build test project" | ||
run: mxbuild -o automation.mda Native-Mobile-Resources-main/NativeComponentsTestProject.mpr | ||
run: mxbuild -o automation.mda --loose-version-check Native-Mobile-Resources-main/NativeComponentsTestProject.mpr | ||
- name: "Upload MDA" | ||
uses: actions/upload-artifact@v3.1.2 | ||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | ||
with: | ||
name: mda | ||
path: automation.mda | ||
|
@@ -158,9 +158,9 @@ jobs: | |
container: ghcr.io/mendix/native-widgets/mxbuild:${{ needs.mendix-version.outputs.mendix-version }} | ||
steps: | ||
- name: "Check out code" | ||
uses: actions/checkout@v3.4.0 | ||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | ||
- name: "Download deployment package" | ||
uses: actions/download-artifact@v3.0.2 | ||
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | ||
with: | ||
name: mda | ||
- name: "Create Android bundle" | ||
|
@@ -174,9 +174,9 @@ jobs: | |
container: ghcr.io/mendix/native-widgets/mxbuild:${{ needs.mendix-version.outputs.mendix-version }} | ||
steps: | ||
- name: "Check out code" | ||
uses: actions/checkout@v3.4.0 | ||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | ||
- name: "Download project MDA file" | ||
uses: actions/download-artifact@v3.0.2 | ||
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | ||
with: | ||
name: mda | ||
- name: "Create iOS bundle" | ||
|
@@ -189,22 +189,22 @@ jobs: | |
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: "Check out Native Template for Native Components Test Project" | ||
uses: actions/checkout@v3.4.0 | ||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | ||
with: | ||
repository: mendix/native-template | ||
ref: master | ||
path: native-template | ||
- name: "Check out code" | ||
uses: actions/checkout@v3.4.0 | ||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | ||
with: | ||
path: native-widgets | ||
- name: "Download Android bundle and assets" | ||
uses: actions/download-artifact@v3.0.2 | ||
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | ||
with: | ||
name: android-bundle | ||
path: bundles/android | ||
- name: "Set up Node" | ||
uses: actions/setup-node@v3.6.0 | ||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 | ||
with: | ||
node-version-file: native-template/.nvmrc | ||
cache: npm | ||
|
@@ -219,17 +219,17 @@ jobs: | |
- name: "Install dependencies" | ||
working-directory: native-template | ||
run: npm i | ||
- name: "Setup JDK 11" | ||
uses: actions/setup-java@v3.10.0 | ||
- name: "Setup JDK 17" | ||
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1 | ||
with: | ||
java-version: 11 | ||
java-version: 17 | ||
distribution: temurin | ||
cache: gradle | ||
- name: "Build Android app" | ||
working-directory: native-template/android | ||
run: ./gradlew assembleAppstoreDebug assembleAppstoreDebugAndroidTest | ||
- name: "Archive Android app" | ||
uses: actions/upload-artifact@v3.1.2 | ||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | ||
with: | ||
name: android-app | ||
path: native-template/android/app/build/outputs/apk/**/*.apk | ||
|
@@ -238,22 +238,22 @@ jobs: | |
runs-on: macos-12 | ||
steps: | ||
- name: "Check out Native Template for Native Components Test Project" | ||
uses: actions/checkout@v3.4.0 | ||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | ||
with: | ||
repository: mendix/native-template | ||
ref: master | ||
path: native-template | ||
- name: "Check out code" | ||
uses: actions/checkout@v3.4.0 | ||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | ||
with: | ||
path: native-widgets | ||
- name: "Download iOS bundle and assets" | ||
uses: actions/download-artifact@v3.0.2 | ||
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | ||
with: | ||
name: ios-bundle | ||
path: bundles/ios | ||
- name: "Set up Node" | ||
uses: actions/setup-node@v3.6.0 | ||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 | ||
with: | ||
node-version-file: native-template/.nvmrc | ||
cache: npm | ||
|
@@ -269,7 +269,7 @@ jobs: | |
run: npm i | ||
|
||
- name: "Setup Pods cache" | ||
uses: actions/cache@v3.3.1 | ||
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed # v2 | ||
with: | ||
path: native-template/Pods | ||
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} | ||
|
@@ -282,17 +282,17 @@ jobs: | |
working-directory: native-template/ios | ||
run: xcodebuild -workspace NativeTemplate.xcworkspace -scheme nativeTemplate -configuration Debug -sdk iphonesimulator -derivedDataPath build ONLY_ACTIVE_ARCH=YES VALID_ARCHS="i386 x86_64" | ||
- name: "Archive iOS app" | ||
uses: actions/upload-artifact@v3.1.2 | ||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | ||
with: | ||
name: ios-app | ||
path: native-template/ios/build/Build/Products/**/*.app | ||
android-avd: | ||
runs-on: macos-12 | ||
steps: | ||
- name: "Check out code" | ||
uses: actions/checkout@v3.4.0 | ||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | ||
- name: "Setup AVD cache" | ||
uses: actions/cache@v3.3.1 | ||
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed # v2 | ||
id: avd-cache | ||
with: | ||
path: | | ||
|
@@ -302,7 +302,7 @@ jobs: | |
key: pixel_30_x86_64_default_3core_and_system_images | ||
- name: "Create AVD and generate snapshot for caching" | ||
if: steps.avd-cache.outputs.cache-hit != 'true' | ||
uses: reactivecircus/android-emulator-runner@v2.27.0 | ||
uses: reactivecircus/android-emulator-runner@6b0df4b0efb23bb0ec63d881db79aefbc976e4b2 # v2.30.1 | ||
with: | ||
api-level: 30 | ||
target: default | ||
|
@@ -321,18 +321,18 @@ jobs: | |
runs-on: macos-12 | ||
steps: | ||
- name: "Check out code" | ||
uses: actions/checkout@v3.4.0 | ||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: "Set up node" | ||
uses: actions/setup-node@v3.6.0 | ||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: yarn | ||
- name: "Install dependencies" | ||
run: yarn install --immutable | ||
- name: "Download project MDA file" | ||
uses: actions/download-artifact@v3.0.2 | ||
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | ||
with: | ||
name: mda | ||
- name: "Start runtime" | ||
|
@@ -341,7 +341,7 @@ jobs: | |
mda-file: automation.mda | ||
mendix-version: ${{ needs.mendix-version.outputs.mendix-version }} | ||
- name: "Download Android app" | ||
uses: actions/download-artifact@v3.0.2 | ||
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | ||
with: | ||
name: android-app | ||
path: android-app | ||
|
@@ -350,7 +350,7 @@ jobs: | |
mkdir -p detox/apps | ||
find android-app -type f -iname "*.apk" -exec mv {} detox/apps/ \; | ||
- name: "Setup AVD cache" | ||
uses: actions/cache@v3.3.1 | ||
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed # v2 | ||
id: avd-cache | ||
with: | ||
path: | | ||
|
@@ -359,7 +359,7 @@ jobs: | |
/Users/runner/Library/Android/sdk/system-images/**/* | ||
key: pixel_30_x86_64_default_3core_and_system_images | ||
- name: "Run tests" | ||
uses: reactivecircus/android-emulator-runner@v2.27.0 | ||
uses: reactivecircus/android-emulator-runner@6b0df4b0efb23bb0ec63d881db79aefbc976e4b2 # v2.30.1 | ||
with: | ||
api-level: 30 | ||
target: default | ||
|
@@ -381,14 +381,14 @@ jobs: | |
adb shell pm install -r -g -t /data/local/tmp/detox/Test.apk 2>/dev/null | ||
yarn workspaces foreach ${{ needs.scope.outputs.scope }} run test:e2e:android | ||
- name: "Archive runtime logs" | ||
uses: actions/upload-artifact@v3.1.2 | ||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | ||
if: always() | ||
with: | ||
name: android-runtime-logs | ||
path: log/*.log | ||
if-no-files-found: ignore | ||
- name: "Archive test screenshot diff results" | ||
uses: actions/upload-artifact@v3.1.2 | ||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | ||
if: failure() | ||
with: | ||
name: android-screenshot-results | ||
|
@@ -397,7 +397,7 @@ jobs: | |
${{ github.workspace }}/packages/**/e2e/images/actual/**/*.png | ||
if-no-files-found: ignore | ||
- name: "Archive artifacts" | ||
uses: actions/upload-artifact@v3.1.2 | ||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | ||
if: always() | ||
with: | ||
name: android-artifacts | ||
|
@@ -408,18 +408,18 @@ jobs: | |
runs-on: macos-12 | ||
steps: | ||
- name: "Check out code" | ||
uses: actions/checkout@v3.4.0 | ||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: "Set up node" | ||
uses: actions/setup-node@v3.6.0 | ||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: yarn | ||
- name: "Install dependencies" | ||
run: yarn install --immutable | ||
- name: "Download project MDA file" | ||
uses: actions/download-artifact@v3.0.2 | ||
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | ||
with: | ||
name: mda | ||
# Used when new xCode version of simulator should be created | ||
|
@@ -435,7 +435,7 @@ jobs: | |
mda-file: automation.mda | ||
mendix-version: ${{ needs.mendix-version.outputs.mendix-version }} | ||
- name: "Download iOS app" | ||
uses: actions/download-artifact@v3.0.2 | ||
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | ||
with: | ||
name: ios-app | ||
path: ios-app | ||
|
@@ -458,14 +458,14 @@ jobs: | |
- name: "Run tests" | ||
run: yarn workspaces foreach ${{ needs.scope.outputs.scope }} run test:e2e:ios | ||
- name: "Archive runtime logs" | ||
uses: actions/upload-artifact@v3.1.2 | ||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | ||
if: always() | ||
with: | ||
name: ios-runtime-logs | ||
path: log/*.log | ||
if-no-files-found: ignore | ||
- name: "Archive test screenshot diff results" | ||
uses: actions/upload-artifact@v3.1.2 | ||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | ||
if: failure() | ||
with: | ||
name: ios-screenshot-results | ||
|
@@ -474,7 +474,7 @@ jobs: | |
${{ github.workspace }}/packages/**/e2e/images/actual/**/*.png | ||
if-no-files-found: ignore | ||
- name: "Archive artifacts" | ||
uses: actions/upload-artifact@v3.1.2 | ||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | ||
if: always() | ||
with: | ||
name: ios-artifacts | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.