Skip to content

Commit

Permalink
Revert "[CI] Sync tests with Device farm (#1605)"
Browse files Browse the repository at this point in the history
This reverts commit c2e0810.
  • Loading branch information
Christian Melchior committed Jan 10, 2024
1 parent c2e0810 commit 8271b37
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 341 deletions.
27 changes: 7 additions & 20 deletions .github/actions/run-android-device-farm-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@ name: 'Run Android tests on Device Farm'
inputs:
apk-path:
required: true
apk-auxiliary-path:
description: 'Install additional APKs needed for the tests'
default: ''
required: false
app-id:
description: 'The test runner class to use'
required: true
project-arn:
required: true
Expand All @@ -22,14 +17,12 @@ runs:
using: "composite"
steps:
- name: Run the tests
uses: nhachicha/aws-devicefarm/test-application@master

uses: realm/aws-devicefarm/test-application@7b9a91236c456c97e28d384c9e476035d5ea686b
id: run-tests
with:
project_arn: ${{ inputs.project-arn }}
device_pool_arn: ${{ inputs.device-pool-arn }}
app_file: ${{ inputs.apk-path }}
app_auxiliary_files: ${{ inputs.apk-auxiliary-path }}
app_type: ANDROID_APP
test_type: APPIUM_PYTHON
test_package_file: https://github.com/realm/aws-devicefarm-sample-data/releases/download/0.3/sample_env_python3.zip
Expand All @@ -45,8 +38,7 @@ runs:
- export PYTHON_VERSION=3
test:
commands:
- adb shell pm list packages | grep realm
- adb shell am instrument -w -r ${{ inputs.app-id }}/androidx.test.runner.AndroidJUnitRunner | egrep 'OK \([0-9]+ test[s]?\)'
- adb shell am instrument -w -r io.realm.testapp.test/androidx.test.runner.AndroidJUnitRunner | egrep 'OK \([0-9]+ test[s]?\)'
- run: |
Install-Module -Name AWSPowerShell -Force
Expand All @@ -61,16 +53,11 @@ runs:
echo "All File Artifacts:"
echo $fileArtifacts
$logCatArtifacts = $fileArtifacts | Where-Object { $_.Name -EQ "Logcat" }
if ($logCatArtifacts) {
echo "LogCat Artifacts:"
echo $logCatArtifacts
echo "::group::Logcat"
Invoke-WebRequest -Uri $logCatArtifacts[0].Url | Select-Object -Expand RawContent
echo "::endgroup::"
} else {
Write-Warning "No logCatArtifacts found."
}
echo "LogCat Artifacts:"
echo $logCatArtifacts
echo "::group::Logcat"
Invoke-WebRequest -Uri $logCatArtifacts[0].Url | Select-Object -Expand RawContent
echo "::endgroup::"
shell: pwsh
if: always()
name: Device Farm Output
34 changes: 0 additions & 34 deletions .github/workflows/include-check-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ on:
value: ${{ jobs.check-cache.outputs.packages-android-cache-hit }}
android-test-base-apk-cache-hit:
value: ${{ jobs.check-cache.outputs.android-test-base-apk-cache-hit }}
android-test-sync-apk-cache-hit:
value: ${{ jobs.check-cache.outputs.android-test-sync-apk-cache-hit }}
packages-macos-x64-cache-hit:
value: ${{ jobs.check-cache.outputs.packages-macos-x64-cache-hit }}
packages-macos-arm64-cache-hit:
Expand Down Expand Up @@ -65,7 +63,6 @@ jobs:
packages-jvm-cache-hit: ${{ steps.jvm-cache.outputs.cache-hit }}
packages-android-cache-hit: ${{ steps.android-cache.outputs.cache-hit }}
android-test-base-apk-cache-hit: ${{ steps.android-test-base-apk.outputs.cache-hit }}
android-test-sync-apk-cache-hit: ${{ steps.android-test-sync-apk.outputs.cache-hit }}
packages-macos-x64-cache-hit: ${{ steps.macos-x64-cache.outputs.cache-hit }}
packages-macos-arm64-cache-hit: ${{ steps.macos-arm64-cache.outputs.cache-hit }}
packages-ios-x64-cache-hit: ${{ steps.ios-x64-cache.outputs.cache-hit }}
Expand Down Expand Up @@ -279,18 +276,6 @@ jobs:
path: ./packages/test-base/build/outputs/apk/androidTest/debug/test-base-debug-androidTest.apk
key: android-base-test-apk-key-${{ steps.packages-cache-key.outputs.sha }}

#
# Android Sync Test APK
#
- name: Check Android Sync Test APK
id: android-test-sync-apk
uses: cmelchior/cache@main
with:
key: android-sync-test-apk-key-${{ steps.packages-cache-key.outputs.sha }}
path: |
./packages/test-sync/build/outputs/apk/androidTest/debug/test-sync-debug-androidTest.apk
./packages/test-sync/build/outputs/apk/debug/test-sync-debug.apk
- name: Save Android Test APK
uses: actions/upload-artifact@v3
if: always() && !cancelled() && steps.android-test-base-apk.outputs.cache-hit == 'true'
Expand All @@ -299,32 +284,13 @@ jobs:
path: ./packages/test-base/build/outputs/apk/androidTest/debug/test-base-debug-androidTest.apk
retention-days: 1

- name: Save Android Sync Test APK
uses: actions/upload-artifact@v3
if: always() && !cancelled() && steps.android-test-sync-apk.outputs.cache-hit == 'true'
with:
name: android-sync-test-apk-${{ steps.find-library-version.outputs.label }}
retention-days: 1
path: |
./packages/test-sync/build/outputs/apk/androidTest/debug/test-sync-debug-androidTest.apk
./packages/test-sync/build/outputs/apk/debug/test-sync-debug.apk
- name: Delete Android Test APK cache files
id: delete-cache-android-base-test-apk
uses: JesseTG/[email protected]
if: always() && !cancelled() && steps.android-test-base-apk.outputs.cache-hit == 'true'
with:
path: ./packages/test-base/build/outputs/apk/androidTest/debug/test-base-debug-androidTest.apk

- name: Delete Android Sync Test APK cache files
id: delete-cache-android-sync-test-apk
uses: JesseTG/[email protected]
if: always() && !cancelled() && steps.android-test-sync-apk.outputs.cache-hit == 'true'
with:
path: |
./packages/test-sync/build/outputs/apk/androidTest/debug/test-sync-debug-androidTest.apk
./packages/test-sync/build/outputs/apk/debug/test-sync-debug.apk
#
# MacOS arm64
#
Expand Down
Loading

0 comments on commit 8271b37

Please sign in to comment.