Skip to content

Ad-hoc Release Tests - Maestro Cloud #129

Ad-hoc Release Tests - Maestro Cloud

Ad-hoc Release Tests - Maestro Cloud #129

Workflow file for this run

name: Release - Run E2E Maestro Tests
on:
workflow_dispatch:
inputs:
app-version:
description: 'App Version for Testing'
required: true
default: 'PLACEHOLDER'
type: string
test-tag:
description: 'Maestro Tests tag to include'
required: true
default: 'releaseTest'
type: string
env:
ASANA_PAT: ${{ secrets.ASANA_ACCESS_TOKEN }}
emoji_info: ":information_source:" # ℹ️
emoji_success: ":white_check_mark:" #
emoji_failure: ":x:" #
jobs:
run-release-tests:
name: Create release APK and run E2E Maestro tests
runs-on: ubuntu-latest
steps:
- name: Checkout and Assemble
id: assemble
uses: ./.github/actions/checkout-and-assemble
with:
commit: ${{ inputs.app-version }}
flavours: 'play'
release_properties: ${{ secrets.FAKE_RELEASE_PROPERTIES }}
release_key: ${{ secrets.FAKE_RELEASE_KEY }}
gradle_encryption_key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
develocity_access_key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- name: Maestro tests flows
id: release-tests
uses: mobile-dev-inc/action-maestro-cloud@v1.9.8
timeout-minutes: 120
with:
api-key: ${{ secrets.ROBIN_API_KEY }}
project-id: ${{ vars.ROBIN_ANDROID_PROJECT_ID }}
timeout: ${{ vars.ROBIN_TIMEOUT_MINUTES }}
app-file: ${{ steps.assemble.outputs.play_apk_path }}
android-api-level: 30
workspace: .maestro
include-tags: ${{ inputs.test-tag }}
- name: Analyze Maestro Flow Results
if: always()
id: analyze-flow-results
uses: ./.github/actions/maestro-flow-analyzer
with:
flow_results_json: ${{ steps.release-tests.outputs.MAESTRO_CLOUD_FLOW_RESULTS }}
console_url: ${{ steps.release-tests.outputs.MAESTRO_CLOUD_CONSOLE_URL }}
upload_status: ${{ steps.release-tests.outputs.MAESTRO_CLOUD_UPLOAD_STATUS }}
app_binary_id: ${{ steps.release-tests.outputs.MAESTRO_CLOUD_APP_BINARY_ID }}
- name: Access Outputs (for debugging)
if: always()
run: |
echo "Console URL: ${{ steps.release-tests.outputs.MAESTRO_CLOUD_CONSOLE_URL }}"
echo 'Flow Results (JSON): ${{ steps.release-tests.outputs.MAESTRO_CLOUD_FLOW_RESULTS }}'
echo "Release Tests Step Conclusion: ${{ steps.release-tests.conclusion }}" # From Maestro action itself
echo "Analyzed Flow Summary Status: ${{ steps.analyze-flow-results.outputs.flow_summary_status }}" # From analyzer action
printf "Analyzed Flow Summary Message:\n%s\n" "${{ steps.analyze-flow-results.outputs.flow_summary_message }}"
- name: Create Asana task when workflow failed
if: ${{ failure() }}
id: create-failure-task
uses: duckduckgo/native-github-asana-sync@v2.0
with:
asana-pat: ${{ secrets.ASANA_ACCESS_TOKEN }}
asana-project: ${{ vars.GH_ANDROID_APP_PROJECT_ID }}
asana-section: ${{ vars.GH_ANDROID_APP_INCOMING_SECTION_ID }}
asana-task-name: GH Workflow Failure - Tag Android Release (Robin)
asana-task-description: Run Release Tests in Maestro has failed. See https://github.com/duckduckgo/Android/actions/runs/${{ github.run_id }}
action: 'create-asana-task'