forked from mobile-dev-inc/maestro
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from dojo-engineering/task/VIS-4480-build-maest…
…ro-from-fork-and-deploy-binary-for-use-by-bitrise 🚀 [VIS-4480] Get maestro working on android api level 24 and above and build and deploy to github releases
- Loading branch information
Showing
7 changed files
with
92 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Build Maestro for Dojo | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '8' | ||
distribution: 'adopt' | ||
|
||
- name: Assemble APKs | ||
run: ./gradlew :maestro-android:assembleAndroidTest :maestro-android:assemble | ||
|
||
- name: Install maestro-cli | ||
run: ./gradlew :maestro-cli:installDist -q | ||
|
||
- name: Create GitHub Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: release-${{ github.run_id }} | ||
release_name: Release ${{ github.run_id }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload maestro-cli asset to GitHub release | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./maestro-cli/build/install/maestro/bin/maestro | ||
asset_name: maestro | ||
asset_content_type: application/octet-stream |
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
23 changes: 23 additions & 0 deletions
23
maestro-android/src/androidTest/java/dev/mobile/maestro/AccessibilityNodeInfoExt.kt
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package dev.mobile.maestro | ||
|
||
import android.os.Build | ||
import android.view.accessibility.AccessibilityNodeInfo | ||
|
||
object AccessibilityNodeInfoExt { | ||
|
||
/** | ||
* Retrieves the hint text associated with this [android.view.accessibility.AccessibilityNodeInfo]. | ||
* | ||
* If the device API level is below 26 (Oreo), this function provides a fallback | ||
* by returning an empty CharSequence instead. | ||
* | ||
* @return [CharSequence] representing the hint text or its fallback. | ||
*/ | ||
fun AccessibilityNodeInfo.getHintOrFallback(): CharSequence { | ||
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { | ||
this.hintText | ||
} else { | ||
"" | ||
} | ||
} | ||
} |
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
Binary file not shown.
Binary file not shown.