Only use "max. operations per yield point" for tasks.org/OpenTasks op… #593
Workflow file for this run
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: Development tests | |
on: push | |
jobs: | |
compile: | |
name: Compile and cache | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 21 | |
# See https://community.gradle.org/github-actions/docs/setup-gradle/ for more information | |
- uses: gradle/actions/setup-gradle@v4 # creates build cache when on main branch | |
with: | |
cache-encryption-key: ${{ secrets.gradle_encryption_key }} | |
gradle-home-cache-cleanup: true # clean up unused files | |
dependency-graph: generate-and-submit # submit Github Dependency Graph info | |
- run: ./gradlew --build-cache --configuration-cache compileDebugSources | |
test: | |
needs: compile | |
name: Tests without emulator | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 21 | |
- uses: gradle/actions/setup-gradle@v4 | |
with: | |
cache-encryption-key: ${{ secrets.gradle_encryption_key }} | |
cache-read-only: true | |
- name: Run lint and unit tests | |
run: ./gradlew --build-cache --configuration-cache lintDebug testDebugUnitTest | |
test_on_emulator: | |
needs: compile | |
name: Tests with emulator | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
api-level: [ 31 ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 21 | |
- uses: gradle/actions/setup-gradle@v4 | |
with: | |
cache-encryption-key: ${{ secrets.gradle_encryption_key }} | |
cache-read-only: true | |
- name: Enable KVM group perms | |
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: Cache AVD and APKs | |
uses: actions/cache@v4 | |
id: avd-cache | |
with: | |
path: | | |
~/.android/avd/* | |
~/.android/adb* | |
~/.apk | |
key: avd-${{ matrix.api-level }} | |
- name: Create AVD and generate snapshot for caching | |
if: steps.avd-cache.outputs.cache-hit != 'true' | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: ${{ matrix.api-level }} | |
arch: x86_64 | |
force-avd-creation: false | |
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: false | |
script: echo "Generated AVD snapshot for caching." | |
- name: Install task apps and run tests | |
uses: reactivecircus/android-emulator-runner@v2 | |
env: | |
version_at_techbee_jtx: v2.9.0 | |
version_org_tasks: 131104 | |
version_org_dmfs_tasks: 82200 | |
with: | |
api-level: ${{ matrix.api-level }} | |
arch: x86_64 | |
force-avd-creation: false | |
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: true | |
script: | | |
mkdir .apk && cd .apk | |
(wget -cq -O org.dmfs.tasks.apk https://f-droid.org/repo/org.dmfs.tasks_${{ env.version_org_dmfs_tasks }}.apk || wget -cq -O org.dmfs.tasks.apk https://f-droid.org/archive/org.dmfs.tasks_${{ env.version_org_dmfs_tasks }}.apk) && adb install org.dmfs.tasks.apk | |
(wget -cq -O org.tasks.apk https://f-droid.org/repo/org.tasks_${{ env.version_org_tasks }}.apk || wget -cq -O org.tasks.apk https://f-droid.org/archive/org.tasks_${{ env.version_org_tasks }}.apk) && adb install org.tasks.apk | |
(wget -cq -O at.techbee.jtx.apk https://github.com/TechbeeAT/jtxBoard/releases/download/${{ env.version_at_techbee_jtx }}/jtxBoard-${{ env.version_at_techbee_jtx }}.apk) && adb install at.techbee.jtx.apk | |
cd .. | |
./gradlew --build-cache --configuration-cache connectedCheck -Pandroid.testInstrumentationRunnerArguments.notAnnotation=androidx.test.filters.FlakyTest |