fix: 修复主题模式 #12
Workflow file for this run
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: Instrument Tests | |
| on: | |
| pull_request: | |
| paths: | |
| - "app/**" | |
| - ".github/workflows/instrument-test.yml" | |
| - "build.gradle.kts" | |
| - "settings.gradle.kts" | |
| - "gradle.properties" | |
| - "gradle/**" | |
| workflow_dispatch: | |
| jobs: | |
| android-instrument-tests: | |
| name: Mock Instrumented Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set Up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: zulu | |
| java-version: "17" | |
| cache: gradle | |
| - name: Setup Android SDK | |
| uses: android-actions/setup-android@v3 | |
| - name: Change wrapper permissions | |
| run: chmod +x ./gradlew | |
| - name: Enable KVM | |
| run: | | |
| echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
| sudo udevadm control --reload-rules | |
| sudo udevadm trigger --name-match=kvm | |
| - name: Run mock-mode connected androidTest on emulator | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| api-level: 36 | |
| arch: x86_64 | |
| target: default | |
| profile: pixel_7 | |
| emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim | |
| disable-animations: true | |
| script: | | |
| ANDROID_SERIAL=emulator-5554 ./gradlew connectedLiteDebugAndroidTest --console=plain -Dorg.gradle.configuration-cache=false |