Skip to content

v3.1.0

v3.1.0 #35

Workflow file for this run

name: android
env:
CI: true
on:
push:
branches: [ master ]
pull_request:
branches: [ develop, master ]
jobs:
build-test:
if: github.event.pull_request.draft == false
runs-on: [ self-hosted, macOS, ARM64 ]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Prepare Environment
uses: ./.github/actions/prepare-env
- name: Get version details from build.gradle
run: |
VERSION_CODE=$(awk -F'=' '/canonicalVersionCode/ {print $2; exit}' android/app/build.gradle | tr -d ' ')
VERSION_NAME=$(awk -F'=' '/canonicalVersionName/ {print $2; exit}' android/app/build.gradle | tr -d ' ' | tr -d '"')
echo "VERSION_CODE=$VERSION_CODE" >> $GITHUB_ENV
echo "VERSION_NAME=$VERSION_NAME" >> $GITHUB_ENV
echo "TIMESTAMP=$(date +%s)" >> $GITHUB_ENV
- name: Build tests
working-directory: android
run: ./gradlew app:assembleAndroidTest
- name: Run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 34
avd-name: ci-actions-avd
target: google_apis
arch: arm64-v8a
ndk: 25.1.8937393
cmake: 3.18.1
script: cd android; ./gradlew app:connectedAndroidTest -Pandroid.testInstrumentationRunnerArguments.notClass=com.xrpllabs.xumm.DetoxTest --info
- name: Test Summary
uses: test-summary/action@dist
with:
paths: android/app/build/outputs/androidTest-results/connected/**/*.xml
show: "all"
if: always()
- name: Build APK
working-directory: android
run: ./gradlew app:assembleRelease --quiet
- name: Upload APK dev release
uses: actions/upload-artifact@v4
with:
name: ${{ env.TIMESTAMP }}_Xaman_${{ env.VERSION_NAME }}_${{ env.VERSION_CODE }} APK(s)
path: android/app/build/outputs/apk/release/