Agent Session 2025-10-09: relax broadcast timing assertion #85
This file contains hidden or 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: Android CI | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ '**' ] | |
| pull_request: | |
| concurrency: | |
| group: android-ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| unit-tests: | |
| name: Unit tests (Robolectric) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '17' | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@v3 | |
| - name: Show versions | |
| run: | | |
| ./gradlew --version | |
| java -version | |
| - name: Bootstrap Android SDK (Tier 0) | |
| env: | |
| TERM: dumb | |
| run: bash scripts/agent/healthcheck.sh --tier 0 | |
| - name: Run unit tests | |
| env: | |
| JAVA_TOOL_OPTIONS: -Xmx2g -Dfile.encoding=UTF-8 | |
| run: | | |
| ./gradlew test --no-daemon --continue | |
| - name: Coverage (Jacoco) | |
| run: | | |
| ./gradlew jacocoAll --no-daemon || echo 'jacocoAll task not found, skipping' | |
| - name: Upload unit test reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: unit-tests-reports | |
| path: | | |
| **/build/test-results/test/**/* | |
| **/build/reports/tests/**/* | |
| - name: Upload coverage reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: jacoco-reports | |
| path: | | |
| **/build/reports/jacoco/**/* | |
| **/build/reports/jacocoTestReport/**/* | |
| android-instrumented: | |
| name: Instrumentation tests (AVD Linux) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 35 | |
| needs: unit-tests | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '17' | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@v3 | |
| - name: Bootstrap Android SDK (Tier 0) | |
| env: | |
| TERM: dumb | |
| run: bash scripts/agent/healthcheck.sh --tier 0 | |
| - name: Accept SDK licenses | |
| run: yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses >/dev/null | |
| - name: Cache Android SDK components (emulator + images) | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ${{ env.ANDROID_HOME }}/emulator | |
| ${{ env.ANDROID_HOME }}/platform-tools | |
| ${{ env.ANDROID_HOME }}/platforms/android-34 | |
| ${{ env.ANDROID_HOME }}/system-images/android-34/** | |
| key: ${{ runner.os }}-android-sdk-34-${{ hashFiles('.github/workflows/android-ci.yml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-android-sdk-34- | |
| - name: Install emulator image (ATD) | |
| run: | | |
| yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager \ | |
| "emulator" \ | |
| "platform-tools" \ | |
| "platforms;android-34" \ | |
| "system-images;android-34;google_atd;x86_64" | |
| - name: Assemble app and androidTest APKs | |
| env: | |
| JAVA_TOOL_OPTIONS: -Xmx2g -Dfile.encoding=UTF-8 | |
| run: | | |
| ./gradlew :SaidIt:assembleDebug :SaidIt:assembleDebugAndroidTest --no-daemon | |
| - name: Run instrumentation tests (attempt 1) | |
| id: run-instrumentation-1 | |
| continue-on-error: true | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| api-level: 34 | |
| target: google_atd | |
| arch: x86_64 | |
| profile: pixel_6 | |
| force-avd-creation: false | |
| emulator-boot-timeout: 900 | |
| ram-size: 3072 | |
| disk-size: 6G | |
| emulator-options: >- | |
| -no-window -gpu swiftshader_indirect -no-audio -no-boot-anim | |
| -camera-back none -camera-front none -no-snapshot -read-only | |
| -no-metrics -netdelay none -netspeed full | |
| disable-animations: true | |
| script: | | |
| adb start-server | |
| adb wait-for-device | |
| ./gradlew :SaidIt:connectedDebugAndroidTest --no-daemon | |
| - name: Run instrumentation tests (retry once) | |
| if: steps.run-instrumentation-1.outcome == 'failure' | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| api-level: 34 | |
| target: google_atd | |
| arch: x86_64 | |
| profile: pixel_6 | |
| force-avd-creation: false | |
| emulator-boot-timeout: 900 | |
| ram-size: 3072 | |
| disk-size: 6G | |
| emulator-options: >- | |
| -no-window -gpu swiftshader_indirect -no-audio -no-boot-anim | |
| -camera-back none -camera-front none -no-snapshot -read-only | |
| -no-metrics -netdelay none -netspeed full | |
| disable-animations: true | |
| script: | | |
| adb start-server | |
| adb wait-for-device | |
| ./gradlew :SaidIt:connectedDebugAndroidTest --no-daemon | |
| - name: Upload android test reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: android-instrumented-reports | |
| path: | | |
| SaidIt/build/reports/androidTests/connected/**/* | |
| SaidIt/build/outputs/androidTest-results/connected/**/* | |
| lint: | |
| name: Android Lint | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| needs: unit-tests | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '17' | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@v3 | |
| - name: Bootstrap Android SDK (Tier 0) | |
| env: | |
| TERM: dumb | |
| run: bash scripts/agent/healthcheck.sh --tier 0 | |
| - name: Run lint | |
| env: | |
| JAVA_TOOL_OPTIONS: -Xmx2g -Dfile.encoding=UTF-8 | |
| run: | | |
| ./gradlew :SaidIt:lint :core:lint :audio:lint --no-daemon --continue | |
| - name: Upload lint reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: lint-reports | |
| path: | | |
| **/build/reports/lint-results*.* |