Skip to content

fix: android user agent version #2561

fix: android user agent version

fix: android user agent version #2561

Workflow file for this run

name: Tests
on: [push, pull_request]
jobs:
unit-test:
runs-on: ubuntu-latest
strategy:
matrix:
module: [tracking, messagingpush, messaginginapp, base]
name: Unit tests (${{ matrix.module }})
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-android
- name: Run unit tests (${{ matrix.module }})
run: ./gradlew :${{ matrix.module }}:runJacocoTestReport
- name: Upload code coverage report
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_UPLOAD_TOKEN }}
with:
fail_ci_if_error: true # fail if upload fails so we can catch it and fix it right away.
verbose: true
files: ./${{ matrix.module }}/build/reports/jacoco/test/jacocoTestReport.xml,./${{ matrix.module }}/build/reports/jacoco/runJacocoTestReport/runJacocoTestReport.xml
- name: Publish test results (${{ matrix.module }})
uses: mikepenz/action-junit-report@v4
with:
report_paths: '**/build/test-results/test*/TEST-*.xml'
fail_on_failure: true
require_tests: true
if: ${{ always() }} # if running tests fails, we still want to parse the test results
instrumentation-test:
runs-on: macos-latest
timeout-minutes: 45
strategy:
# Add more samples here as they are added to the project.
matrix:
sample: [kotlin_compose, java_layout]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-android
- name: Start emulator
uses: reactivecircus/android-emulator-runner@v2
with:
# Configuration options for the emulator for the best optimization.
api-level: 29
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
ram-size: 4096M
emulator-boot-timeout: 12000
target: default
arch: x86
emulator-build: 7425822 # https://github.com/ReactiveCircus/android-emulator-runner/issues/160
profile: Nexus 6
# Run the instrumentation tests on the emulator.
script: ./gradlew :samples:${{ matrix.sample }}:connectedDebugAndroidTest
- name: Publish test results
uses: mikepenz/action-junit-report@v4
if: always()
with:
report_paths: 'samples/${{ matrix.sample }}/build/outputs/androidTest-results/connected/TEST-*.xml'