Run Release Tests in Maestro #5
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
name: Run Release Tests in Maestro | |
on: | |
workflow_dispatch: | |
inputs: | |
app-version: | |
description: 'App Version for Release' | |
required: true | |
default: 'PLACEHOLDER' | |
env: | |
ASANA_PAT: ${{ secrets.GH_ASANA_SECRET }} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
run-release-tests: | |
name: Run Release tests of tag version in Maestro | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
ref: ${{ github.event.inputs.app-version }} | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- name: Create folder | |
if: always() | |
run: mkdir apk | |
- name: Decode keys | |
uses: davidSchuppa/base64Secret-toFile-action@v2 | |
with: | |
secret: ${{ secrets.FAKE_RELEASE_PROPERTIES }} | |
fileName: ddg_android_build.properties | |
destination-path: $HOME/jenkins_static/com.duckduckgo.mobile.android/ | |
- name: Decode key file | |
uses: davidSchuppa/base64Secret-toFile-action@v2 | |
with: | |
secret: ${{ secrets.FAKE_RELEASE_KEY }} | |
fileName: android | |
destination-path: $HOME/jenkins_static/com.duckduckgo.mobile.android/ | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Assemble release APK | |
run: ./gradlew assemblePlayRelease -Pforce-default-variant | |
- name: Move APK to new folder | |
if: always() | |
run: find . -name "*.apk" -exec mv '{}' apk/release.apk \; | |
- name: Release tests flows | |
uses: mobile-dev-inc/[email protected] | |
with: | |
api-key: ${{ secrets.MOBILE_DEV_API_KEY }} | |
name: ${{ github.sha }} | |
app-file: apk/release.apk | |
android-api-level: 30 | |
workspace: .maestro | |
include-tags: releaseTest | |
- name: Create Asana task when workflow failed | |
if: ${{ failure() }} | |
id: create-failure-task | |
uses: duckduckgo/[email protected] | |
with: | |
asana-pat: ${{ secrets.GH_ASANA_SECRET }} | |
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 | |
asana-task-description: Tag Android Release has failed. See https://github.com/duckduckgo/Android/actions/runs/${{ github.run_id }} | |
action: 'create-asana-task' |